16 lines
489 B
TypeScript
16 lines
489 B
TypeScript
import { notFound } from 'next/navigation';
|
|
import { TeamLeaderboardPageQuery } from '@/lib/page-queries/TeamLeaderboardPageQuery';
|
|
import { TeamLeaderboardPageWrapper } from './TeamLeaderboardPageWrapper';
|
|
|
|
export default async function TeamLeaderboardPage() {
|
|
const query = new TeamLeaderboardPageQuery();
|
|
const result = await query.execute();
|
|
|
|
if (result.isErr()) {
|
|
notFound();
|
|
}
|
|
|
|
const data = result.unwrap();
|
|
return <TeamLeaderboardPageWrapper data={data.teams} />;
|
|
}
|