website refactor
This commit is contained in:
@@ -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