website refactor
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import { ErrorPageContainer } from '@/ui/ErrorPageContainer';
|
||||
import { ErrorActionButtons } from '@/ui/ErrorActionButtons';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { GlobalErrorScreen } from '@/components/errors/GlobalErrorScreen';
|
||||
import './globals.css';
|
||||
|
||||
export default function GlobalError({
|
||||
error,
|
||||
@@ -16,24 +15,14 @@ export default function GlobalError({
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className="antialiased">
|
||||
<ErrorPageContainer
|
||||
errorCode="Error"
|
||||
description={error?.message || 'An unexpected error occurred.'}
|
||||
>
|
||||
{error?.digest && (
|
||||
<Text size="xs" color="text-gray-500" font="mono">
|
||||
Error ID: {error.digest}
|
||||
</Text>
|
||||
)}
|
||||
<ErrorActionButtons
|
||||
onRetry={reset}
|
||||
onHomeClick={() => router.push(routes.public.home)}
|
||||
showRetry={true}
|
||||
/>
|
||||
</ErrorPageContainer>
|
||||
<html lang="en" className="dark scroll-smooth overflow-x-hidden">
|
||||
<body className="antialiased bg-base-black text-white overflow-x-hidden">
|
||||
<GlobalErrorScreen
|
||||
error={error}
|
||||
reset={reset}
|
||||
onHome={() => router.push(routes.public.home)}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user