website refactor

This commit is contained in:
2026-01-20 21:35:50 +01:00
parent 06207bf835
commit 51288234f4
42 changed files with 892 additions and 449 deletions

View File

@@ -2,7 +2,7 @@ import { Result } from '@/lib/contracts/Result';
import { PageQuery } from '@/lib/contracts/page-queries/PageQuery';
import { PresentationError, mapToPresentationError } from '@/lib/contracts/page-queries/PresentationError';
import { TeamService } from '@/lib/services/teams/TeamService';
import type { TeamSummaryViewModel } from '@/lib/view-models/TeamSummaryViewModel';
import { TeamSummaryViewModel } from '@/lib/view-models/TeamSummaryViewModel';
export interface TeamLeaderboardPageData {
teams: TeamSummaryViewModel[];
@@ -18,15 +18,7 @@ export class TeamLeaderboardPageQuery implements PageQuery<TeamLeaderboardPageDa
return Result.err(mapToPresentationError(result.getError()));
}
const teams = result.unwrap().map((t: any) => ({
id: t.id,
name: t.name,
logoUrl: t.logoUrl,
memberCount: t.memberCount,
totalWins: t.totalWins,
totalRaces: t.totalRaces,
rating: 1450, // Mocked as in original
} as TeamSummaryViewModel));
const teams = result.unwrap().map((t: any) => new TeamSummaryViewModel(t));
return Result.ok({ teams });
} catch (error) {