website refactor
This commit is contained in:
@@ -10,7 +10,8 @@ import { Calendar, Car, Clock, LucideIcon } from 'lucide-react';
|
||||
|
||||
interface RaceHeroProps {
|
||||
track: string;
|
||||
scheduledAt: string;
|
||||
formattedDate: string;
|
||||
formattedTime: string;
|
||||
car: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
statusConfig: {
|
||||
@@ -20,9 +21,8 @@ interface RaceHeroProps {
|
||||
};
|
||||
}
|
||||
|
||||
export function RaceHero({ track, scheduledAt, car, status, statusConfig }: RaceHeroProps) {
|
||||
export function RaceHero({ track, formattedDate, formattedTime, car, status, statusConfig }: RaceHeroProps) {
|
||||
const StatusIcon = statusConfig.icon;
|
||||
const date = new Date(scheduledAt);
|
||||
|
||||
return (
|
||||
<Hero variant="primary">
|
||||
@@ -59,11 +59,11 @@ export function RaceHero({ track, scheduledAt, car, status, statusConfig }: Race
|
||||
<Stack direction="row" align="center" gap={6} wrap>
|
||||
<Stack direction="row" align="center" gap={2}>
|
||||
<Icon icon={Calendar} size={4} color="rgb(156, 163, 175)" />
|
||||
<Text color="text-gray-400">{date.toLocaleDateString()}</Text>
|
||||
<Text color="text-gray-400">{formattedDate}</Text>
|
||||
</Stack>
|
||||
<Stack direction="row" align="center" gap={2}>
|
||||
<Icon icon={Clock} size={4} color="rgb(156, 163, 175)" />
|
||||
<Text color="text-gray-400">{date.toLocaleTimeString()}</Text>
|
||||
<Text color="text-gray-400">{formattedTime}</Text>
|
||||
</Stack>
|
||||
<Stack direction="row" align="center" gap={2}>
|
||||
<Icon icon={Car} size={4} color="rgb(156, 163, 175)" />
|
||||
|
||||
Reference in New Issue
Block a user