website refactor
This commit is contained in:
28
apps/website/templates/FatalErrorTemplate.tsx
Normal file
28
apps/website/templates/FatalErrorTemplate.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { ErrorScreen } from '@/components/errors/ErrorScreen';
|
||||
|
||||
export interface FatalErrorViewData {
|
||||
error: Error & { digest?: string };
|
||||
}
|
||||
|
||||
interface FatalErrorTemplateProps {
|
||||
viewData: FatalErrorViewData;
|
||||
reset: () => void;
|
||||
onHome: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* FatalErrorTemplate
|
||||
*
|
||||
* The top-most error template for the global error boundary.
|
||||
* Follows "Precision Racing Minimal" theme via ErrorScreen.
|
||||
*/
|
||||
export function FatalErrorTemplate({ viewData, reset, onHome }: FatalErrorTemplateProps) {
|
||||
return (
|
||||
<ErrorScreen
|
||||
error={viewData.error}
|
||||
reset={reset}
|
||||
onHome={onHome}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user