{tournament.title}
- {#if tournament.tagline} -{tournament.tagline}
- {:else if tournament.description} -{tournament.description}
- {/if} --
- {#if tournament.start_at}
-
diff --git a/web/src/routes/(tournament)/tournament/+page.svelte b/web/src/routes/(tournament)/tournament/+page.svelte index 5e076c9..9fcfafa 100644 --- a/web/src/routes/(tournament)/tournament/+page.svelte +++ b/web/src/routes/(tournament)/tournament/+page.svelte @@ -20,17 +20,19 @@ const tournaments = $derived(() => sortTournaments(tournamentList)); function upsertTournament(tournament: TournamentInfo) { - const index = tournamentList.findIndex((item) => item.id === tournament.id); + const index = tournamentList.findIndex((item: { id: number }) => item.id === tournament.id); if (index >= 0) { - tournamentList = tournamentList.map((item, idx) => (idx === index ? tournament : item)); + tournamentList = tournamentList.map((item: any, idx: any) => + idx === index ? tournament : item + ); return; } tournamentList = [...tournamentList, tournament]; } function removeTournament(id: number) { - if (!tournamentList.some((item) => item.id === id)) return; - tournamentList = tournamentList.filter((item) => item.id !== id); + if (!tournamentList.some((item: { id: number }) => item.id === id)) return; + tournamentList = tournamentList.filter((item: { id: number }) => item.id !== id); } function formatDate(value: string | null) { @@ -63,10 +65,10 @@ return `${count} ${count === 1 ? 'spelare' : 'spelare'}`; } -onMount(() => { - const stop = listenToTournamentEvents(upsertTournament, removeTournament, { - endpoint: '/api/public-events' - }); + onMount(() => { + const stop = listenToTournamentEvents(upsertTournament, removeTournament, { + endpoint: '/api/public-events' + }); return () => { stop(); }; @@ -80,66 +82,59 @@ onMount(() => {
VBytes LAN
+VBytes LAN
- Samla laget, följ brackets i realtid och håll koll på allt som händer under turneringarna. -
{tournament.tagline}
- {:else if tournament.description} -{tournament.description}
- {/if} -+
Inga turneringar är publicerade ännu. Kom tillbaka senare!
{/if} @@ -147,7 +142,7 @@ onMount(() => {Du är registrerad till {tournament.title}.
- {#if signup.successRegistrationId} -- Anmälan #{signup.successRegistrationId} -
- {/if}VBytes LAN
+VBytes LAN
Du är registrerad till {tournament.title}.
-- Skapad {formatDateTime(registration.created_at) ?? registration.created_at} -
Spel: {tournament.game}
++ Spel: + {tournament.game} +
{#if tournament.start_at}Start: @@ -59,7 +58,8 @@ {/if} {#if tournament.location}
- Plats: {tournament.location} + Plats: + {tournament.location}
{/if}- Kontakt: {tournament.contact} + Kontakt: + {tournament.contact}
{/if}+
Den här turneringen kräver inga uppgifter utöver spelare.
{:else}{field.label}
+{field.label}
{fieldValue(entryValues, field) || '—'}
Spelare {index + 1}
++ Spelare {index + 1} +