Add naming scheme selection to run configuration
Add a nullable naming_scheme column to NuzlockeRun so users can pick a themed word category for nickname suggestions. Includes Alembic migration, updated Pydantic schemas, a GET /runs/naming-categories endpoint backed by a cached dictionary loader, and frontend dropdowns in both the NewRun creation flow and the RunDashboard for mid-run changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { toast } from 'sonner'
|
||||
import { getRuns, getRun, createRun, updateRun, deleteRun } from '../api/runs'
|
||||
import { getRuns, getRun, createRun, updateRun, deleteRun, getNamingCategories } from '../api/runs'
|
||||
import type { CreateRunInput, UpdateRunInput } from '../types/game'
|
||||
|
||||
export function useRuns() {
|
||||
@@ -51,3 +51,11 @@ export function useDeleteRun() {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function useNamingCategories() {
|
||||
return useQuery({
|
||||
queryKey: ['naming-categories'],
|
||||
queryFn: getNamingCategories,
|
||||
staleTime: Infinity,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user