wip
This commit is contained in:
@@ -27,6 +27,7 @@ import Card from '@/components/ui/Card';
|
||||
import Button from '@/components/ui/Button';
|
||||
import { getAuthService } from '@/lib/auth';
|
||||
import { getGetDashboardOverviewUseCase } from '@/lib/di-container';
|
||||
import { DashboardOverviewPresenter } from '@/lib/presenters/DashboardOverviewPresenter';
|
||||
import type {
|
||||
DashboardOverviewViewModel,
|
||||
DashboardFeedItemSummaryViewModel,
|
||||
@@ -94,8 +95,9 @@ export default async function DashboardPage() {
|
||||
const currentDriverId = session.user.primaryDriverId ?? '';
|
||||
|
||||
const useCase = getGetDashboardOverviewUseCase();
|
||||
await useCase.execute({ driverId: currentDriverId });
|
||||
const viewModel = useCase.presenter.getViewModel() as DashboardOverviewViewModel | null;
|
||||
const presenter = new DashboardOverviewPresenter();
|
||||
await useCase.execute({ driverId: currentDriverId }, presenter);
|
||||
const viewModel = presenter.getViewModel();
|
||||
|
||||
if (!viewModel) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user