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:
2026-02-08 12:55:11 +01:00
parent 2d4aa9d562
commit 069093ebae
5 changed files with 104 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import type {
CreateEncounterInput,
UpdateEncounterInput,
Evolution,
Pokemon,
} from '../types/game'
export function createEncounter(
@@ -28,3 +29,7 @@ export function fetchEvolutions(pokemonId: number, region?: string): Promise<Evo
const params = region ? `?region=${encodeURIComponent(region)}` : ''
return api.get(`/pokemon/${pokemonId}/evolutions${params}`)
}
export function fetchForms(pokemonId: number): Promise<Pokemon[]> {
return api.get(`/pokemon/${pokemonId}/forms`)
}