website refactor

This commit is contained in:
2026-01-14 23:46:04 +01:00
parent c1a86348d7
commit 4a2d7d15a5
294 changed files with 5637 additions and 3418 deletions

View File

@@ -1,24 +1,15 @@
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();
const query = new TeamsPageQuery();
const result = await query.execute();
switch (result.status) {
case 'ok':
const viewData = TeamsViewDataBuilder.build(result.dto);
return <TeamsPageClient teams={viewData.teams} />;
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();
if (result.isErr()) {
notFound();
}
}
const viewData = result.unwrap();
return <TeamsPageClient viewData={viewData} />;
}