website refactor
This commit is contained in:
@@ -4,6 +4,7 @@ import React from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { NotFoundTemplate, type NotFoundViewData } from '@/templates/NotFoundTemplate';
|
||||
import { ClientWrapperProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
/**
|
||||
* NotFoundPageClient
|
||||
@@ -11,14 +12,14 @@ import { NotFoundTemplate, type NotFoundViewData } from '@/templates/NotFoundTem
|
||||
* Client-side entry point for the 404 page.
|
||||
* Manages navigation logic and wires it to the template.
|
||||
*/
|
||||
export function NotFoundPageClient() {
|
||||
export function NotFoundPageClient({ viewData: initialViewData }: Partial<ClientWrapperProps<NotFoundViewData>>) {
|
||||
const router = useRouter();
|
||||
|
||||
const handleHomeClick = () => {
|
||||
router.push(routes.public.home);
|
||||
};
|
||||
|
||||
const viewData: NotFoundViewData = {
|
||||
const viewData: NotFoundViewData = initialViewData ?? {
|
||||
errorCode: 'Error 404',
|
||||
title: 'OFF TRACK',
|
||||
message: 'The requested sector does not exist. You have been returned to the pits.',
|
||||
|
||||
Reference in New Issue
Block a user