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,21 @@
import type { GetDriverProfileOutputDTO } from '@/lib/types/generated/GetDriverProfileOutputDTO';
import type { DriverProfileViewData } from './DriverProfileViewData';
/**
* DriverProfileViewDataBuilder
*
* Transforms GetDriverProfileOutputDTO into ViewData for the driver profile page.
* Deterministic, side-effect free, no HTTP calls.
*/
export class DriverProfileViewDataBuilder {
static build(apiDto: GetDriverProfileOutputDTO): DriverProfileViewData {
return {
currentDriver: apiDto.currentDriver || null,
stats: apiDto.stats || null,
finishDistribution: apiDto.finishDistribution || null,
teamMemberships: apiDto.teamMemberships,
socialSummary: apiDto.socialSummary,
extendedProfile: apiDto.extendedProfile || null,
};
}
}