quivr/frontend/app/global-error.jsx
Stan Girard e95b965fe8
fix(sentry): Refactor GlobalError component to use arrow function syntax (#2252)
This pull request refactors the GlobalError component to use arrow
function syntax, improving code readability and maintainability.
2024-02-23 17:32:29 -08:00

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;