website refactor

This commit is contained in:
2026-01-12 01:01:49 +01:00
parent 5ca6023a5a
commit fefd8d1cd6
294 changed files with 4628 additions and 4991 deletions

View File

@@ -19,9 +19,9 @@ export default async function DriverLeaderboardPage() {
);
// Prepare data for template
const data: DriverLeaderboardViewModel | null = driverData as DriverLeaderboardViewModel | null;
const data: DriverLeaderboardViewModel | null = driverData;
const hasData = (driverData as any)?.drivers?.length > 0;
const hasData = (driverData?.drivers?.length ?? 0) > 0;
// Handle loading state (should be fast since we're using async/await)
const isLoading = false;

View File

@@ -37,11 +37,11 @@ export default async function LeaderboardsPage() {
// Prepare data for template
const data: LeaderboardsPageData = {
drivers: driverData as DriverLeaderboardViewModel | null,
teams: teamsData as TeamSummaryViewModel[] | null,
drivers: driverData,
teams: teamsData,
};
const hasData = (driverData as any)?.drivers?.length > 0 || (teamsData as any)?.length > 0;
const hasData = (driverData?.drivers?.length ?? 0) > 0 || (teamsData?.length ?? 0) > 0;
// Handle loading state (should be fast since we're using async/await)
const isLoading = false;