-
-
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: test api standings of single race
- Loading branch information
1 parent
45926f1
commit 0aac508
Showing
5 changed files
with
71 additions
and
37 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
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,34 @@ | ||
'use client'; | ||
|
||
import { useAtom } from 'jotai'; | ||
|
||
import { Tabs } from '@/app/ui/Tabs'; | ||
import { | ||
constructorStandingsAtom, | ||
driverStandingsAtom, | ||
fetchStandings, | ||
} from '@/atoms/results'; | ||
|
||
// import { RaceSchedule } from '../../RaceResults'; | ||
import { StandingsTimeline } from '../../StandingsTimeline'; | ||
|
||
export default function ResultsPage() { | ||
useAtom(fetchStandings); | ||
const [constructorStandings] = useAtom(constructorStandingsAtom); | ||
const [driverStandings] = useAtom(driverStandingsAtom); | ||
|
||
return ( | ||
<main> | ||
<Tabs | ||
headers={['Drivers', 'Constructors']} | ||
containers={[ | ||
<StandingsTimeline key='Driver Standings' data={driverStandings} />, | ||
<StandingsTimeline | ||
key='Constructor Standings' | ||
data={constructorStandings} | ||
/>, | ||
]} | ||
/> | ||
</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
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