This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
web-client/app/error.tsx
Seiwy ebbefc03d9
Some checks failed
/ docker (pull_request) Failing after 4m3s
Nuked the pervious files, but the NextUI works
2024-06-11 10:59:56 +02:00

32 lines
548 B
TypeScript

"use client";
import { useEffect } from "react";
export default function Error({
error,
reset,
}: {
error: Error;
reset: () => void;
}) {
useEffect(() => {
// Log the error to an error reporting service
/* eslint-disable no-console */
console.error(error);
}, [error]);
return (
<div>
<h2>Something went wrong!</h2>
<button
onClick={
// Attempt to recover by trying to re-render the segment
() => reset()
}
>
Try again
</button>
</div>
);
}