28 lines
759 B
TypeScript
28 lines
759 B
TypeScript
'use client';
|
|
|
|
import { Star, Trophy } from 'lucide-react';
|
|
|
|
interface DriverRatingProps {
|
|
rating: number | null;
|
|
rank: number | null;
|
|
}
|
|
|
|
export default function DriverRating({ rating, rank }: DriverRatingProps) {
|
|
return (
|
|
<div className="mt-0.5 flex items-center gap-2 text-[11px]">
|
|
<span className="inline-flex items-center gap-1 text-amber-300">
|
|
<Star className="h-3 w-3" />
|
|
<span className="tabular-nums">
|
|
{rating !== null ? rating : '—'}
|
|
</span>
|
|
</span>
|
|
|
|
{rank !== null && (
|
|
<span className="inline-flex items-center gap-1 text-primary-blue">
|
|
<Trophy className="h-3 w-3" />
|
|
<span className="tabular-nums">#{rank}</span>
|
|
</span>
|
|
)}
|
|
</div>
|
|
);
|
|
} |