website refactor

This commit is contained in:
2026-01-14 10:51:05 +01:00
parent 4522d41aef
commit 0d89ad027e
291 changed files with 6887 additions and 3685 deletions

View File

@@ -0,0 +1,22 @@
import type { DriversLeaderboardDTO } from '@/lib/types/generated/DriversLeaderboardDTO';
import type { DriversViewData } from './DriversViewData';
/**
* DriversViewDataBuilder
*
* Transforms DriversLeaderboardDTO into ViewData for the drivers listing page.
* Deterministic, side-effect free, no HTTP calls.
*
* This builder does NOT perform filtering or sorting - that belongs in the API.
* If the API doesn't support filtering, it should be marked as NotImplemented.
*/
export class DriversViewDataBuilder {
static build(apiDto: DriversLeaderboardDTO): DriversViewData {
return {
drivers: apiDto.drivers,
totalRaces: apiDto.totalRaces,
totalWins: apiDto.totalWins,
activeCount: apiDto.activeCount,
};
}
}