website refactor
This commit is contained in:
26
apps/website/client-wrapper/DashboardPageClient.tsx
Normal file
26
apps/website/client-wrapper/DashboardPageClient.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
'use client';
|
||||
|
||||
import { DashboardTemplate } from '@/templates/DashboardTemplate';
|
||||
import type { DashboardViewData } from '@/lib/view-data/DashboardViewData';
|
||||
import { ClientWrapperProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
|
||||
/**
|
||||
* DashboardPageClient
|
||||
*
|
||||
* Client wrapper for the Dashboard page.
|
||||
* Manages client-side interactions for the dashboard.
|
||||
*/
|
||||
export function DashboardPageClient({ viewData }: ClientWrapperProps<DashboardViewData>) {
|
||||
const router = useRouter();
|
||||
|
||||
const handleNavigateToRaces = () => router.push(routes.public.races);
|
||||
|
||||
return (
|
||||
<DashboardTemplate
|
||||
viewData={viewData}
|
||||
onNavigateToRaces={handleNavigateToRaces}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user