Add genlocke cumulative graveyard with backend endpoint and UI
Aggregates all fainted encounters across every leg of a genlocke into a
unified graveyard view. Backend serves GET /genlockes/{id}/graveyard with
per-entry leg/game context and summary stats (total deaths, deaths per
leg, deadliest leg). Frontend adds a toggle button on the genlocke detail
page that reveals a filterable/sortable grid of grayscale Pokemon cards.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { api } from './client'
|
||||
import type { Genlocke, GenlockeListItem, GenlockeDetail, CreateGenlockeInput, Region } from '../types/game'
|
||||
import type { Genlocke, GenlockeListItem, GenlockeDetail, GenlockeGraveyard, CreateGenlockeInput, Region } from '../types/game'
|
||||
|
||||
export function getGenlockes(): Promise<GenlockeListItem[]> {
|
||||
return api.get('/genlockes')
|
||||
@@ -17,6 +17,10 @@ export function getGamesByRegion(): Promise<Region[]> {
|
||||
return api.get('/games/by-region')
|
||||
}
|
||||
|
||||
export function getGenlockeGraveyard(id: number): Promise<GenlockeGraveyard> {
|
||||
return api.get(`/genlockes/${id}/graveyard`)
|
||||
}
|
||||
|
||||
export function advanceLeg(genlockeId: number, legOrder: number): Promise<Genlocke> {
|
||||
return api.post(`/genlockes/${genlockeId}/legs/${legOrder}/advance`, {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user