code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 10s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped

This commit is contained in:
2026-01-27 17:36:39 +01:00
parent 9894c4a841
commit e04282d77e
32 changed files with 431 additions and 246 deletions

View File

@@ -90,6 +90,7 @@ export function DriverProfileTemplate({
<Stack gap={4}>
<Box display="flex" alignItems="center" justifyContent="between">
<Button
data-testid="back-to-drivers-button"
variant="secondary"
onClick={onBackClick}
icon={<ArrowLeft size={16} />}
@@ -125,18 +126,22 @@ export function DriverProfileTemplate({
{/* Stats Grid */}
{careerStats.length > 0 && (
<DriverStatsPanel stats={careerStats} />
<Box data-testid="driver-stats-panel">
<DriverStatsPanel stats={careerStats} />
</Box>
)}
{/* Team Memberships */}
{teamMemberships.length > 0 && (
<TeamMembershipGrid
memberships={teamMemberships.map((m) => ({
team: { id: m.teamId, name: m.teamName },
role: m.role,
joinedAtLabel: m.joinedAtLabel
}))}
/>
<Box data-testid="team-membership-grid">
<TeamMembershipGrid
memberships={teamMemberships.map((m) => ({
team: { id: m.teamId, name: m.teamName },
role: m.role,
joinedAtLabel: m.joinedAtLabel
}))}
/>
</Box>
)}
{/* Tab Navigation */}
@@ -146,28 +151,32 @@ export function DriverProfileTemplate({
{activeTab === 'overview' && (
<Stack gap={6}>
{stats && (
<DriverPerformanceOverview
stats={{
wins: stats.wins,
podiums: stats.podiums,
totalRaces: stats.totalRaces,
consistency: stats.consistency || 0,
dnfs: stats.dnfs,
bestFinish: stats.bestFinish || 0,
avgFinish: stats.avgFinish || 0
}}
/>
<Box data-testid="performance-overview">
<DriverPerformanceOverview
stats={{
wins: stats.wins,
podiums: stats.podiums,
totalRaces: stats.totalRaces,
consistency: stats.consistency || 0,
dnfs: stats.dnfs,
bestFinish: stats.bestFinish || 0,
avgFinish: stats.avgFinish || 0
}}
/>
</Box>
)}
{extendedProfile && (
<DriverRacingProfile
racingStyle={extendedProfile.racingStyle}
favoriteTrack={extendedProfile.favoriteTrack}
favoriteCar={extendedProfile.favoriteCar}
availableHours={extendedProfile.availableHours}
lookingForTeam={extendedProfile.lookingForTeam}
openToRequests={extendedProfile.openToRequests}
/>
<Box data-testid="driver-racing-profile">
<DriverRacingProfile
racingStyle={extendedProfile.racingStyle}
favoriteTrack={extendedProfile.favoriteTrack}
favoriteCar={extendedProfile.favoriteCar}
availableHours={extendedProfile.availableHours}
lookingForTeam={extendedProfile.lookingForTeam}
openToRequests={extendedProfile.openToRequests}
/>
</Box>
)}
{extendedProfile && extendedProfile.achievements.length > 0 && (