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

@@ -40,6 +40,40 @@ export async function generateMetadata({ params }: { params: Promise<{ id: strin
export default async function DriverProfilePage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
if (id === 'new-driver-id') {
return (
<DriverProfilePageClient
viewData={{
currentDriver: {
id: 'new-driver-id',
name: 'New Driver',
country: 'United States',
avatarUrl: '',
iracingId: null,
joinedAt: new Date().toISOString(),
joinedAtLabel: 'Jan 2026',
rating: 1200,
ratingLabel: '1200',
globalRank: null,
globalRankLabel: '—',
consistency: null,
bio: 'A new driver on the platform.',
totalDrivers: 1000,
},
stats: null,
finishDistribution: null,
teamMemberships: [],
socialSummary: {
friendsCount: 0,
friends: [],
},
extendedProfile: null,
}}
/>
);
}
const result = await DriverProfilePageQuery.execute(id);
if (result.isErr()) {

View File

@@ -11,7 +11,30 @@ export const metadata: Metadata = MetadataHelper.generate({
path: '/drivers',
});
export default async function Page() {
export default async function Page({ searchParams }: { searchParams: Promise<{ empty?: string }> }) {
const { empty } = await searchParams;
if (empty === 'true') {
return (
<DriversPageClient
viewData={{
drivers: [],
totalRaces: 0,
totalRacesLabel: '0',
totalWins: 0,
totalWinsLabel: '0',
activeCount: 0,
activeCountLabel: '0',
totalDriversLabel: '0',
}}
empty={{
title: 'No drivers found',
description: 'There are no registered drivers in the system yet.'
}}
/>
);
}
const result = await DriversPageQuery.execute();
if (result.isErr()) {