-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: include main filters and available server data for results ui
- Loading branch information
1 parent
c2f84b6
commit 4bbf295
Showing
5 changed files
with
132 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use client'; | ||
|
||
import { RaceSchedule } from './RaceResults'; | ||
import { | ||
constructorsData, | ||
ConstuctorHeadings, | ||
driverData, | ||
DriverHeadings, | ||
} from '../lib/placerholder-results'; | ||
import { Table } from '../ui/Table'; | ||
import { Tabs } from '../ui/Tabs'; | ||
|
||
const tabHeaders = ['Races', 'Drivers', 'Constructors']; | ||
const tabs = [ | ||
<RaceSchedule key='Race Results' />, | ||
|
||
<div key='Drivers Championship' className='rounded bg-base-100 p-4'> | ||
<Table headings={DriverHeadings} data={driverData} /> | ||
</div>, | ||
<div key='Constructors Championship' className='rounded bg-base-100 p-4'> | ||
<Table headings={ConstuctorHeadings} data={constructorsData} />, | ||
</div>, | ||
]; | ||
|
||
export default function ResultsPage() { | ||
return ( | ||
<main className='min-h-screen'> | ||
<Tabs headers={tabHeaders} containers={tabs} /> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use client'; | ||
|
||
import { useAtom } from 'jotai'; | ||
|
||
import ResultsPage from '../SeasonResults'; | ||
import { handleSeasonChangeAtom } from '../../../atoms/results'; | ||
|
||
export default function Page({ params }: { params: { slug: string } }) { | ||
const [, handleSeasonChange] = useAtom(handleSeasonChangeAtom); | ||
handleSeasonChange(params.slug); | ||
|
||
return <ResultsPage />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,5 @@ | ||
'use client'; | ||
|
||
import { RaceResults } from './RaceResults'; | ||
import { | ||
constructorsData, | ||
ConstuctorHeadings, | ||
driverData, | ||
DriverHeadings, | ||
} from '../lib/placerholder-results'; | ||
import { Table } from '../ui/Table'; | ||
import { Tabs } from '../ui/Tabs'; | ||
|
||
const tabHeaders = ['Races', 'Drivers', 'Constructors']; | ||
const tabs = [ | ||
<RaceResults key='Race Results' />, | ||
|
||
<div key='Drivers Championship' className='rounded bg-base-100 p-4'> | ||
<Table headings={DriverHeadings} data={driverData} /> | ||
</div>, | ||
<div key='Constructors Championship' className='rounded bg-base-100 p-4'> | ||
<Table headings={ConstuctorHeadings} data={constructorsData} />, | ||
</div>, | ||
]; | ||
import ResultsPage from './SeasonResults'; | ||
|
||
export default function Page() { | ||
return ( | ||
<main className='min-h-screen'> | ||
<Tabs headers={tabHeaders} containers={tabs} /> | ||
</main> | ||
); | ||
return <ResultsPage />; | ||
} |