Add non-evolution form change support (Rotom, Oricorio, etc.)
Add a "Change Form" button in StatusChangeModal for Pokemon with alternate forms sharing the same national_dex number. Mirrors the existing evolution UI pattern, reusing currentPokemonId to track the active form. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
updateEncounter,
|
||||
deleteEncounter,
|
||||
fetchEvolutions,
|
||||
fetchForms,
|
||||
} from '../api/encounters'
|
||||
import type { CreateEncounterInput, UpdateEncounterInput } from '../types/game'
|
||||
|
||||
@@ -50,3 +51,11 @@ export function useEvolutions(pokemonId: number | null, region?: string) {
|
||||
enabled: pokemonId !== null,
|
||||
})
|
||||
}
|
||||
|
||||
export function useForms(pokemonId: number | null) {
|
||||
return useQuery({
|
||||
queryKey: ['forms', pokemonId],
|
||||
queryFn: () => fetchForms(pokemonId!),
|
||||
enabled: pokemonId !== null,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user