This commit is contained in:
2025-12-12 01:11:36 +01:00
parent ec3ddc3a5c
commit 6a88fe93ab
125 changed files with 1513 additions and 803 deletions

View File

@@ -7,6 +7,7 @@ import Card from '@/components/ui/Card';
import Button from '@/components/ui/Button';
import Heading from '@/components/ui/Heading';
import { getGetRacesPageDataUseCase } from '@/lib/di-container';
import { RacesPagePresenter } from '@/lib/presenters/RacesPagePresenter';
import type {
RacesPageViewModel,
RaceListItemViewModel,
@@ -46,8 +47,9 @@ export default function RacesPage() {
const loadRaces = async () => {
try {
const useCase = getGetRacesPageDataUseCase();
await useCase.execute();
const data = useCase.presenter.getViewModel();
const presenter = new RacesPagePresenter();
await useCase.execute(undefined, presenter);
const data = presenter.getViewModel();
setPageData(data);
} catch (err) {
console.error('Failed to load races:', err);