diff --git a/src/routes/data/season/+page.svelte b/src/routes/data/season/+page.svelte index cd0be38..366ab62 100644 --- a/src/routes/data/season/+page.svelte +++ b/src/routes/data/season/+page.svelte @@ -8,6 +8,8 @@ // TODO: Why does this work but import { type DropdownOption } from "$lib/components" does not? import type { DropdownOption } from "$lib/components/Dropdown.svelte"; import { get_by_value } from "$lib/database"; + import TeamCard from "$lib/components/TeamCard.svelte"; + import DriverCard from "$lib/components/DriverCard.svelte"; let { data, form }: { data: PageData; form: ActionData } = $props(); @@ -18,11 +20,11 @@ } // Maps driver to team: - let create_driver_team_select_value: string = $state(""); let update_driver_team_select_values: { [key: string]: string } = $state({}); data.drivers.forEach((driver: Driver) => { update_driver_team_select_values[driver.id] = driver.team; }); + update_driver_team_select_values["create"] = ""; const driver_team_select_options: DropdownOption[] = data.teams.map((team: Team) => { return { label: team.name, value: team.id } as DropdownOption; @@ -57,77 +59,15 @@
{#each data.teams as team} - -
- {#if data.admin} - - {/if} - -
- Name - - - - Upload Logo or Drag and Drop - - - -
- - -
-
-
-
+ {/each} {#if data.admin} - -
-
- - Name - - - - Upload Logo or Drag and Drop - - - -
- - - - -
-
-
-
+ {/if}
{:else if current_tab === 1} @@ -138,130 +78,22 @@
{#each data.drivers as driver} - -
- {#if data.admin} - - {/if} - -
- - First Name - Last Name - Driver Code - - - Team - - - - Upload Headshot or Drag and Drop - - - -
- - -
-
-
-
+ {/each} {#if data.admin} - -
-
- - First Name - Last Name - Driver Code - - - Team - - - - Upload Headshot or Drag and Drop - - - -
- -
-
-
-
+ {/if}
{:else if current_tab === 2}