website refactor

This commit is contained in:
2026-01-20 21:35:50 +01:00
parent 06207bf835
commit 51288234f4
42 changed files with 892 additions and 449 deletions

View File

@@ -3,6 +3,15 @@ import { LeaderboardsPageQuery } from '@/lib/page-queries/LeaderboardsPageQuery'
import { LeaderboardsPageClient } from '@/client-wrapper/LeaderboardsPageClient';
import { routes } from '@/lib/routing/RouteConfig';
import { logger } from '@/lib/infrastructure/logging/logger';
import { Metadata } from 'next';
import { MetadataHelper } from '@/lib/seo/MetadataHelper';
import { JsonLd } from '@/ui/JsonLd';
export const metadata: Metadata = MetadataHelper.generate({
title: 'Global Leaderboards',
description: 'See who leads the pack on GridPilot. Comprehensive global leaderboards for drivers and teams, featuring performance rankings and career statistics.',
path: '/leaderboards',
});
export default async function LeaderboardsPage() {
const result = await LeaderboardsPageQuery.execute();
@@ -24,5 +33,27 @@ export default async function LeaderboardsPage() {
// Success
const viewData = result.unwrap();
return <LeaderboardsPageClient viewData={viewData} />;
}
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'ItemList',
name: 'Global Driver Leaderboard',
description: 'Top performing sim racing drivers on GridPilot',
itemListElement: viewData.drivers.slice(0, 10).map((d, i) => ({
'@type': 'ListItem',
position: i + 1,
item: {
'@type': 'Person',
name: d.name,
url: `https://gridpilot.com/drivers/${d.id}`,
},
})),
};
return (
<>
<JsonLd data={jsonLd} />
<LeaderboardsPageClient viewData={viewData} />
</>
);
}