website refactor

This commit is contained in:
2026-01-15 18:52:03 +01:00
parent f035cfe7ce
commit 5ef149b782
39 changed files with 564 additions and 518 deletions

View File

@@ -1,6 +1,6 @@
'use client';
import React, { useMemo } from 'react';
import React from 'react';
import { Card } from '@/ui/Card';
import { Box } from '@/ui/Box';
import { Stack } from '@/ui/Stack';
@@ -10,7 +10,6 @@ import { Button } from '@/ui/Button';
import { Input } from '@/ui/Input';
import { Select } from '@/ui/Select';
import { Grid } from '@/ui/Grid';
import { GridItem } from '@/ui/GridItem';
import { Surface } from '@/ui/Surface';
import type { LeagueAdminScheduleViewData } from '@/lib/view-data/LeagueAdminScheduleViewData';
@@ -64,10 +63,7 @@ export function LeagueAdminScheduleTemplate({
const isEditing = editingRaceId !== null;
const publishedLabel = published ? 'Published' : 'Unpublished';
const selectedSeasonLabel = useMemo(() => {
const selected = seasons.find((s) => s.seasonId === seasonId);
return selected?.name ?? seasonId;
}, [seasons, seasonId]);
const selectedSeasonLabel = seasons.find((s) => s.seasonId === seasonId)?.name ?? seasonId;
return (
<Stack gap={6}>
@@ -102,7 +98,7 @@ export function LeagueAdminScheduleTemplate({
</Button>
</Stack>
<Box pt={6} style={{ borderTop: '1px solid #262626' }}>
<Box pt={6} borderTop="1px solid" borderColor="border-neutral-800">
<Box mb={4}>
<Heading level={2}>{isEditing ? 'Edit race' : 'Add race'}</Heading>
</Box>
@@ -156,7 +152,7 @@ export function LeagueAdminScheduleTemplate({
</Stack>
</Box>
<Box pt={6} style={{ borderTop: '1px solid #262626' }}>
<Box pt={6} borderTop="1px solid" borderColor="border-neutral-800">
<Box mb={4}>
<Heading level={2}>Races</Heading>
</Box>