website refactor
This commit is contained in:
@@ -17,25 +17,25 @@ interface DriverStat {
|
||||
}
|
||||
|
||||
interface DriversDirectoryHeaderProps {
|
||||
totalDrivers: number;
|
||||
activeDrivers: number;
|
||||
totalWins: number;
|
||||
totalRaces: number;
|
||||
totalDriversLabel: string;
|
||||
activeDriversLabel: string;
|
||||
totalWinsLabel: string;
|
||||
totalRacesLabel: string;
|
||||
onViewLeaderboard: () => void;
|
||||
}
|
||||
|
||||
export function DriversDirectoryHeader({
|
||||
totalDrivers,
|
||||
activeDrivers,
|
||||
totalWins,
|
||||
totalRaces,
|
||||
totalDriversLabel,
|
||||
activeDriversLabel,
|
||||
totalWinsLabel,
|
||||
totalRacesLabel,
|
||||
onViewLeaderboard,
|
||||
}: DriversDirectoryHeaderProps) {
|
||||
const stats: DriverStat[] = [
|
||||
{ label: 'drivers', value: totalDrivers, intent: 'primary' },
|
||||
{ label: 'active', value: activeDrivers, intent: 'success' },
|
||||
{ label: 'total wins', value: totalWins.toLocaleString(), intent: 'warning' },
|
||||
{ label: 'races', value: totalRaces.toLocaleString(), intent: 'telemetry' },
|
||||
{ label: 'drivers', value: totalDriversLabel, intent: 'primary' },
|
||||
{ label: 'active', value: activeDriversLabel, intent: 'success' },
|
||||
{ label: 'total wins', value: totalWinsLabel, intent: 'warning' },
|
||||
{ label: 'races', value: totalRacesLabel, intent: 'telemetry' },
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user