From 1fd63a8057902889f4b8236c63b51447976bcff4 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Mon, 23 Dec 2024 01:21:06 +0100 Subject: [PATCH] Data/Season: Replace card grid for teams/drivers/races/substitutions with tables This is loading fast and non-lazy, on row-click the card opens --- src/routes/data/season/+page.svelte | 255 ++++++++++++++++++---------- 1 file changed, 161 insertions(+), 94 deletions(-) diff --git a/src/routes/data/season/+page.svelte b/src/routes/data/season/+page.svelte index 1a01319..d27d44a 100644 --- a/src/routes/data/season/+page.svelte +++ b/src/routes/data/season/+page.svelte @@ -1,19 +1,23 @@ @@ -116,104 +253,34 @@ -
- - {#if data.admin} - - {/if} - - - {#each data.teams as team} - - {/each} -
+ + {:else if current_tab === 1} -
- - {#if data.admin} - - {/if} - - - {#await data.drivers then drivers} - {#each drivers as driver} - - {/each} - {/await} -
+ + {#await data.drivers then drivers} +
+ {/await} {:else if current_tab === 2} -
- {#if data.admin} - - {/if} - - {#await data.races then races} - {#each races as race} - - {/each} - {/await} -
+ {#await data.races then races} +
+ {/await} {:else if current_tab === 3} -
- {#await data.drivers then drivers} - {#if data.admin} - - {/if} - - {#await data.substitutions then substitutions} - {#each substitutions as substitution} - - {/each} - {/await} - {/await} -
+ {#await data.substitutions then substitutions} +
+ {/await} {/if}