Files
gridpilot.gg/apps/website/app/teams/[id]/page.tsx
2026-01-17 01:04:36 +01:00

20 lines
614 B
TypeScript

import { notFound } from 'next/navigation';
import { TeamDetailPageQuery } from '@/lib/page-queries/TeamDetailPageQuery';
import { TeamDetailPageClient } from './TeamDetailPageClient';
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const result = await TeamDetailPageQuery.execute(id);
if (result.isErr()) {
const error = result.getError();
if (error === 'notFound') {
notFound();
}
// For other errors, treat as not found for now
notFound();
}
return <TeamDetailPageClient viewData={result.unwrap()} />;
}