Files
gridpilot.gg/apps/website/app/profile/leagues/page.tsx
2026-01-12 01:01:49 +01:00

23 lines
853 B
TypeScript

import { notFound } from 'next/navigation';
import { ProfileLeaguesPageQuery } from '@/lib/page-queries/ProfileLeaguesPageQuery';
import { ProfileLeaguesPageClient } from './ProfileLeaguesPageClient';
export default async function ProfileLeaguesPage() {
const result = await ProfileLeaguesPageQuery.execute();
switch (result.status) {
case 'notFound':
notFound();
case 'redirect':
// Note: In Next.js, redirect would be imported from next/navigation
// For now, we'll handle this case by returning notFound
// In a full implementation, you'd use: redirect(result.to);
notFound();
case 'error':
// For now, treat errors as notFound
// In a full implementation, you might render an error page
notFound();
case 'ok':
return <ProfileLeaguesPageClient pageDto={result.dto} />;
}
}