More UX improvements.

This commit is contained in:
Greyson Parrelli
2026-07-24 09:07:54 -04:00
parent 962e3bb5ff
commit 10b6346874
7 changed files with 60 additions and 20 deletions
+3 -2
View File
@@ -23,8 +23,9 @@ export function joinGame(code: string, name: string): Promise<Session> {
return post('/api/join', { code, name })
}
export async function fetchCatalog(): Promise<Card[]> {
const res = await fetch('/api/catalog')
export async function fetchCatalog(pack?: string): Promise<Card[]> {
const url = pack ? `/api/catalog?pack=${encodeURIComponent(pack)}` : '/api/catalog'
const res = await fetch(url)
if (!res.ok) throw new Error('failed to load catalog')
return (await res.json()) as Card[]
}