mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 21:24:58 -05:00
fix(www): 404 null error #6
This commit is contained in:
parent
43ec081367
commit
299e34d21f
@ -1,29 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
}) {
|
||||
useEffect(() => {
|
||||
console.error(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center flex-col">
|
||||
<div className="text-center">
|
||||
<h2 className="text-4xl font-bold mb-4">Something went wrong!</h2>
|
||||
<button
|
||||
onClick={reset}
|
||||
className="text-blue-500 hover:underline"
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
20
apps/www/src/app/global-error.tsx
Normal file
20
apps/www/src/app/global-error.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
'use client';
|
||||
|
||||
export default function GlobalError({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
}) {
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Something went wrong!</h1>
|
||||
<button onClick={() => reset()}>Try again</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user