Add genlocke lineage tracking with aligned timeline view

Implement read-only lineage view that traces Pokemon across genlocke legs
via existing transfer records. Backend walks transfer chains to build
lineage entries; frontend renders them as cards with a column-aligned
timeline grid so leg dots line up vertically across all lineages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 11:58:38 +01:00
parent 4e00e3cad8
commit d3b65e3c79
9 changed files with 541 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { advanceLeg, createGenlocke, getGamesByRegion, getGenlockes, getGenlocke, getGenlockeGraveyard, getLegSurvivors } from '../api/genlockes'
import { advanceLeg, createGenlocke, getGamesByRegion, getGenlockes, getGenlocke, getGenlockeGraveyard, getGenlockeLineages, getLegSurvivors } from '../api/genlockes'
import type { AdvanceLegInput, CreateGenlockeInput } from '../types/game'
export function useGenlockes() {
@@ -23,6 +23,13 @@ export function useGenlockeGraveyard(id: number) {
})
}
export function useGenlockeLineages(id: number) {
return useQuery({
queryKey: ['genlockes', id, 'lineages'],
queryFn: () => getGenlockeLineages(id),
})
}
export function useRegions() {
return useQuery({
queryKey: ['games', 'by-region'],