website refactor
This commit is contained in:
@@ -75,12 +75,12 @@ export function DriverProfileTemplate({
|
||||
const { currentDriver, stats, teamMemberships, socialSummary, extendedProfile } = viewData;
|
||||
|
||||
const careerStats = stats ? [
|
||||
{ label: 'Rating', value: stats.rating || 0, color: 'text-primary-blue' },
|
||||
{ label: 'Wins', value: stats.wins, color: 'text-performance-green' },
|
||||
{ label: 'Podiums', value: stats.podiums, color: 'text-warning-amber' },
|
||||
{ label: 'Total Races', value: stats.totalRaces },
|
||||
{ label: 'Avg Finish', value: stats.avgFinish?.toFixed(1) || '-', subValue: 'POS' },
|
||||
{ label: 'Consistency', value: stats.consistency ? `${stats.consistency}%` : '-' },
|
||||
{ label: 'Rating', value: stats.ratingLabel, color: 'text-primary-blue' },
|
||||
{ label: 'Wins', value: stats.winsLabel, color: 'text-performance-green' },
|
||||
{ label: 'Podiums', value: stats.podiumsLabel, color: 'text-warning-amber' },
|
||||
{ label: 'Total Races', value: stats.totalRacesLabel },
|
||||
{ label: 'Avg Finish', value: stats.avgFinishLabel, subValue: 'POS' },
|
||||
{ label: 'Consistency', value: stats.consistencyLabel, color: 'text-primary-blue' },
|
||||
] : [];
|
||||
|
||||
return (
|
||||
@@ -115,7 +115,9 @@ export function DriverProfileTemplate({
|
||||
avatarUrl={currentDriver.avatarUrl}
|
||||
nationality={currentDriver.country}
|
||||
rating={stats?.rating || 0}
|
||||
globalRank={currentDriver.globalRank ?? undefined}
|
||||
ratingLabel={currentDriver.ratingLabel}
|
||||
safetyRatingLabel="SR 92"
|
||||
globalRankLabel={currentDriver.globalRankLabel}
|
||||
bio={currentDriver.bio}
|
||||
friendRequestSent={friendRequestSent}
|
||||
onAddFriend={onAddFriend}
|
||||
@@ -132,7 +134,7 @@ export function DriverProfileTemplate({
|
||||
memberships={teamMemberships.map((m) => ({
|
||||
team: { id: m.teamId, name: m.teamName },
|
||||
role: m.role,
|
||||
joinedAt: new Date(m.joinedAt)
|
||||
joinedAtLabel: m.joinedAtLabel
|
||||
}))}
|
||||
/>
|
||||
)}
|
||||
@@ -172,7 +174,8 @@ export function DriverProfileTemplate({
|
||||
<AchievementGrid
|
||||
achievements={extendedProfile.achievements.map((a) => ({
|
||||
...a,
|
||||
earnedAt: new Date(a.earnedAt)
|
||||
rarity: a.rarityLabel,
|
||||
earnedAtLabel: a.earnedAtLabel
|
||||
}))}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user