diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3ad31a8..a363ccb 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "calendar-run-frontend", - "version": "0.6.1", + "version": "0.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "calendar-run-frontend", - "version": "0.6.1", + "version": "0.6.2", "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/frontend/package.json b/frontend/package.json index 172d4b8..09af92a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "calendar-run-frontend", "private": true, - "version": "0.6.1", + "version": "0.6.2", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/pages/RacesPage.tsx b/frontend/src/pages/RacesPage.tsx index 34e12fc..1daada7 100644 --- a/frontend/src/pages/RacesPage.tsx +++ b/frontend/src/pages/RacesPage.tsx @@ -33,6 +33,7 @@ const MONTH_OPTIONS: { value: string; label: string }[] = [ const VIEW_STORAGE_KEY = "races-view-mode"; type ViewMode = "list" | "calendar"; +type RaceListTab = "upcoming" | "completed"; function yearSelectOptions(): number[] { const current = new Date().getFullYear(); @@ -61,11 +62,11 @@ function readInitialViewMode(): ViewMode { } } -function RaceList(props: { title: string; races: Race[] }): JSX.Element { - const { title, races } = props; +function RaceList(props: { title: string; races: Race[]; variant: RaceListTab }): JSX.Element { + const { title, races, variant } = props; return ( -
+

{title}

{races.length > 0 ? (