website refactor

This commit is contained in:
2026-01-12 01:01:49 +01:00
parent 5ca6023a5a
commit fefd8d1cd6
294 changed files with 4628 additions and 4991 deletions

View File

@@ -0,0 +1,21 @@
import type { TeamsPageDto } from '@/lib/page-queries/TeamsPageQuery';
import type { TeamsViewData, TeamSummaryData } from '@/templates/TeamsViewData';
/**
* TeamsPresenter - Client-side presenter for teams page
* Transforms PageQuery DTO into ViewData for the template
* Deterministic; no hooks; no side effects
*/
export class TeamsPresenter {
static createViewData(pageDto: TeamsPageDto): TeamsViewData {
const teams = pageDto.teams.map((team): TeamSummaryData => ({
teamId: team.id,
teamName: team.name,
leagueName: team.leagues[0] || '',
memberCount: team.memberCount,
logoUrl: team.logoUrl,
}));
return { teams };
}
}