feat(pokemon): add related Pokemon section to detail view

Fetch related Pokemon based on shared environment and favorite things
Add UI with habitat filtering and highlighted shared attributes
This commit is contained in:
2026-05-02 08:21:46 +08:00
parent f5ab96c2b1
commit 21bbbc7137
6 changed files with 240 additions and 3 deletions

View File

@@ -82,9 +82,18 @@ export interface Pokemon extends EditInfo {
favorite_things: NamedEntity[];
}
export interface RelatedPokemon {
id: number;
name: string;
environment: NamedEntity;
skills: Skill[];
favorite_things: Array<NamedEntity & { matches: boolean }>;
}
export interface PokemonDetail extends Pokemon {
skills: Array<Skill & { itemDrop: NamedEntity | null }>;
favoriteThingItems: Array<NamedEntity & { category: NamedEntity; tags: NamedEntity[] }>;
relatedPokemon: RelatedPokemon[];
editHistory: EditHistoryEntry[];
habitats: Array<{
id: number;