import { notFound } from 'next/navigation'; import { TeamsPageQuery } from '@/lib/page-queries/page-queries/TeamsPageQuery'; import { TeamsViewDataBuilder } from '@/lib/builders/view-data/TeamsViewDataBuilder'; import { TeamsPageClient } from './TeamsPageClient'; export default async function Page() { const result = await TeamsPageQuery.execute(); switch (result.status) { case 'ok': const viewData = TeamsViewDataBuilder.build(result.dto); return ; 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(); } }