diff --git a/src/lib/components/Hall.svelte b/src/lib/components/Hall.svelte index a8a0346..a244e4c 100644 --- a/src/lib/components/Hall.svelte +++ b/src/lib/components/Hall.svelte @@ -3,7 +3,7 @@ // bot, open a table, join by code, the ledger of your tables, and the // about panel with the rules, the guide and a way to reach the keeper. import { goto } from '$app/navigation'; - import { otherGames, type FamilyGame } from '$lib/family'; + import { loadFamily, type FamilyGame } from '$lib/family'; import Preferences from './Preferences.svelte'; import { prefs, setPref } from '$lib/prefs.svelte'; import { allSeats, doubtSeat, forgetSeat, rememberSeat, ServerError, trustSeat } from '$lib/net/client'; @@ -35,8 +35,12 @@ const hours = (minutes: number) => (minutes < 90 ? `${minutes} minutes` : `${Math.round(minutes / 60)} hours`); /** The other games of Kestrel's Hall, for the about panel. */ let family = $state([]); + let hall = $state(''); $effect(() => { - void otherGames('hnefatafl').then((g) => (family = g)); + void loadFamily('hnefatafl').then((f) => { + family = f.games; + hall = f.hall; + }); }); /** Reports this browser's seats have filed, with the keeper's replies. */ let reports = $state([]); @@ -283,7 +287,7 @@

{/if} {#if family.length} -

More games in Kestrel's Hall

+

More games in {#if hall}Kestrel's Hall{:else}Kestrel's Hall{/if}