wip
This commit is contained in:
28
apps/website/components/profile/DriverRatingPill.tsx
Normal file
28
apps/website/components/profile/DriverRatingPill.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
'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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user