Files
gridpilot.gg/apps/website/app/teams/page.tsx
2026-01-14 02:02:24 +01:00

22 lines
706 B
TypeScript

import { notFound } from 'next/navigation';
import { TeamsPageQuery } from '@/lib/page-queries/page-queries/TeamsPageQuery';
import { TeamsPageClient } from './TeamsPageClient';
export default async function Page() {
const result = await TeamsPageQuery.execute();
switch (result.status) {
case 'ok':
return <TeamsPageClient pageDto={result.dto} />;
case 'notFound':
notFound();
case 'redirect':
// This would typically use redirect() from next/navigation
// but we need to handle it at the page level
return null;
case 'error':
// For now, treat errors as not found
// In production, you might want a proper error page
notFound();
}
}