website refactor
This commit is contained in:
@@ -9,7 +9,7 @@ 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.',
|
||||
description: 'Global performance rankings for drivers and teams on GridPilot. Comprehensive leaderboards featuring competitive results and career statistics.',
|
||||
path: '/leaderboards',
|
||||
});
|
||||
|
||||
|
||||
33
apps/website/app/leaderboards/teams/page.tsx
Normal file
33
apps/website/app/leaderboards/teams/page.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { notFound, redirect } from 'next/navigation';
|
||||
import { TeamRankingsPageQuery } from '@/lib/page-queries/TeamRankingsPageQuery';
|
||||
import { TeamRankingsPageClient } from '@/client-wrapper/TeamRankingsPageClient';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { logger } from '@/lib/infrastructure/logging/logger';
|
||||
import { Metadata } from 'next';
|
||||
import { MetadataHelper } from '@/lib/seo/MetadataHelper';
|
||||
|
||||
export const metadata: Metadata = MetadataHelper.generate({
|
||||
title: 'Team Leaderboard',
|
||||
description: 'Global team rankings on GridPilot. See the top performing sim racing teams and their competitive statistics.',
|
||||
path: '/leaderboards/teams',
|
||||
});
|
||||
|
||||
export default async function TeamLeaderboardPage() {
|
||||
const result = await TeamRankingsPageQuery.execute();
|
||||
|
||||
if (result.isErr()) {
|
||||
const error = result.getError();
|
||||
|
||||
if (error === 'notFound') {
|
||||
notFound();
|
||||
} else if (error === 'redirect') {
|
||||
redirect(routes.public.home);
|
||||
} else {
|
||||
logger.error('Team rankings error:', undefined, { error });
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
|
||||
const viewData = result.unwrap();
|
||||
return <TeamRankingsPageClient viewData={viewData} />;
|
||||
}
|
||||
@@ -8,8 +8,8 @@ import { MetadataHelper } from '@/lib/seo/MetadataHelper';
|
||||
import { JsonLd } from '@/ui/JsonLd';
|
||||
|
||||
export const metadata: Metadata = MetadataHelper.generate({
|
||||
title: 'Professional iRacing League Management Platform',
|
||||
description: 'Experience the pinnacle of sim racing organization. GridPilot provides obsessive detail in race management, automated standings, and professional-grade tools for serious iRacing leagues.',
|
||||
title: 'iRacing League Management Infrastructure',
|
||||
description: 'Infrastructure for iRacing league management. Automated standings, race management, and stewarding tools.',
|
||||
path: '/',
|
||||
});
|
||||
|
||||
|
||||
@@ -1,23 +1,6 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { TeamLeaderboardPageQuery } from '@/lib/page-queries/TeamLeaderboardPageQuery';
|
||||
import { TeamLeaderboardPageWrapper } from '@/client-wrapper/TeamLeaderboardPageWrapper';
|
||||
import { Metadata } from 'next';
|
||||
import { MetadataHelper } from '@/lib/seo/MetadataHelper';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
|
||||
export const metadata: Metadata = MetadataHelper.generate({
|
||||
title: 'Team Leaderboard',
|
||||
description: 'The definitive ranking of sim racing teams on GridPilot. Compare team performance, championship points, and overall standing in the professional iRacing community.',
|
||||
path: '/teams/leaderboard',
|
||||
});
|
||||
|
||||
export default async function TeamLeaderboardPage() {
|
||||
const query = new TeamLeaderboardPageQuery();
|
||||
const result = await query.execute();
|
||||
|
||||
if (result.isErr()) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const data = result.unwrap();
|
||||
return <TeamLeaderboardPageWrapper viewData={data} />;
|
||||
export default function TeamLeaderboardRedirect() {
|
||||
redirect(routes.leaderboards.teams);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user