website refactor
This commit is contained in:
@@ -95,7 +95,7 @@ export function DriverRankingsTemplate({
|
||||
</p>
|
||||
|
||||
<p className={`font-mono font-bold ${position === 1 ? 'text-xl text-yellow-400' : 'text-lg text-primary-blue'}`}>
|
||||
{driver.rating.toLocaleString()}
|
||||
{driver.rating.toString()}
|
||||
</p>
|
||||
|
||||
<div className="flex items-center gap-2 text-xs text-gray-500 mt-1">
|
||||
@@ -139,14 +139,6 @@ export function DriverRankingsTemplate({
|
||||
<div className="divide-y divide-charcoal-outline/50">
|
||||
{viewData.drivers.map((driver) => {
|
||||
const position = driver.rank;
|
||||
const medalBg = position === 1 ? 'bg-gradient-to-br from-yellow-400/20 to-yellow-600/10 border-yellow-400/40' :
|
||||
position === 2 ? 'bg-gradient-to-br from-gray-300/20 to-gray-400/10 border-gray-300/40' :
|
||||
position === 3 ? 'bg-gradient-to-br from-amber-600/20 to-amber-700/10 border-amber-600/40' :
|
||||
'bg-iron-gray/50 border-charcoal-outline';
|
||||
const medalColor = position === 1 ? 'text-yellow-400' :
|
||||
position === 2 ? 'text-gray-300' :
|
||||
position === 3 ? 'text-amber-600' :
|
||||
'text-gray-500';
|
||||
|
||||
return (
|
||||
<button
|
||||
@@ -157,7 +149,7 @@ export function DriverRankingsTemplate({
|
||||
>
|
||||
{/* Position */}
|
||||
<div className="col-span-1 flex items-center justify-center">
|
||||
<div className={`flex h-9 w-9 items-center justify-center rounded-full text-sm font-bold border ${medalBg} ${medalColor}`}>
|
||||
<div className={`flex h-9 w-9 items-center justify-center rounded-full text-sm font-bold border ${driver.medalBg} ${driver.medalColor}`}>
|
||||
{position <= 3 ? <Medal className="w-4 h-4" /> : position}
|
||||
</div>
|
||||
</div>
|
||||
@@ -190,7 +182,7 @@ export function DriverRankingsTemplate({
|
||||
{/* Rating */}
|
||||
<div className="col-span-2 lg:col-span-1 flex items-center justify-center">
|
||||
<span className="font-mono font-semibold text-white">
|
||||
{driver.rating.toLocaleString()}
|
||||
{driver.rating.toString()}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user