mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-14 13:19:05 +03:00
e95b965fe8
This pull request refactors the GlobalError component to use arrow function syntax, improving code readability and maintainability.
22 lines
350 B
JavaScript
22 lines
350 B
JavaScript
"use client";
|
|
|
|
import * as Sentry from "@sentry/nextjs";
|
|
import Error from "next/error";
|
|
import { useEffect } from "react";
|
|
|
|
const GlobalError = ({ error }) => {
|
|
useEffect(() => {
|
|
Sentry.captureException(error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html>
|
|
<body>
|
|
<Error />
|
|
</body>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
export default GlobalError;
|