website refactor
This commit is contained in:
@@ -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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user