website refactor
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { LoadingWrapper } from '@/components/shared/state/LoadingWrapper';
|
||||
import { EmptyState } from '@/components/shared/state/EmptyState';
|
||||
import { Pagination } from '@/ui/Pagination';
|
||||
@@ -43,11 +42,11 @@ export function ProfileRaceHistory({ driverId }: RaceHistoryProps) {
|
||||
if (loading) {
|
||||
return (
|
||||
<Stack gap={4}>
|
||||
<Box display="flex" alignItems="center" gap={2}>
|
||||
<Stack display="flex" alignItems="center" gap={2}>
|
||||
{[1, 2, 3].map(i => (
|
||||
<Box key={i} h="9" w="24" bg="bg-iron-gray" rounded="md" animate="pulse" />
|
||||
<Stack key={i} h="9" w="24" bg="bg-iron-gray" rounded="md" animate="pulse" />
|
||||
))}
|
||||
</Box>
|
||||
</Stack>
|
||||
<Card>
|
||||
<LoadingWrapper variant="skeleton" skeletonCount={3} />
|
||||
</Card>
|
||||
@@ -67,7 +66,7 @@ export function ProfileRaceHistory({ driverId }: RaceHistoryProps) {
|
||||
|
||||
return (
|
||||
<Stack gap={4}>
|
||||
<Box display="flex" alignItems="center" gap={2}>
|
||||
<Stack display="flex" alignItems="center" gap={2}>
|
||||
<Button
|
||||
variant={filter === 'all' ? 'primary' : 'secondary'}
|
||||
onClick={() => { setFilter('all'); setPage(1); }}
|
||||
@@ -89,13 +88,13 @@ export function ProfileRaceHistory({ driverId }: RaceHistoryProps) {
|
||||
>
|
||||
Podiums
|
||||
</Button>
|
||||
</Box>
|
||||
</Stack>
|
||||
|
||||
<Card>
|
||||
{/* No results until API provides driver results */}
|
||||
<Box minHeight="100px" display="flex" center>
|
||||
<Stack minHeight="100px" display="flex" center>
|
||||
<Text color="text-gray-500">No results found for the selected filter.</Text>
|
||||
</Box>
|
||||
</Stack>
|
||||
|
||||
<Pagination
|
||||
currentPage={page}
|
||||
|
||||
Reference in New Issue
Block a user