website refactor
This commit is contained in:
@@ -7,8 +7,9 @@ import { DriverTableRow } from '@/components/drivers/DriverTableRow';
|
||||
import { EmptyState } from '@/ui/EmptyState';
|
||||
import type { DriversViewData } from '@/lib/types/view-data/DriversViewData';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Search } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
interface DriversTemplateProps {
|
||||
viewData: DriversViewData | null;
|
||||
@@ -27,14 +28,9 @@ export function DriversTemplate({
|
||||
onDriverClick,
|
||||
onViewLeaderboard
|
||||
}: DriversTemplateProps) {
|
||||
const drivers = viewData?.drivers || [];
|
||||
const totalRaces = viewData?.totalRaces || 0;
|
||||
const totalWins = viewData?.totalWins || 0;
|
||||
const activeCount = viewData?.activeCount || 0;
|
||||
|
||||
return (
|
||||
<Container size="lg" py={8}>
|
||||
<Stack gap={10}>
|
||||
<Group direction="column" gap={10} fullWidth>
|
||||
<DriversDirectoryHeader
|
||||
totalDriversLabel={viewData?.totalDriversLabel || '0'}
|
||||
activeDriversLabel={viewData?.activeCountLabel || '0'}
|
||||
@@ -73,7 +69,7 @@ export function DriversTemplate({
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
</Group>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user