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.
This commit is contained in:
Stan Girard 2024-02-23 17:32:29 -08:00 committed by GitHub
parent 1b6896f8ca
commit e95b965fe8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ import * as Sentry from "@sentry/nextjs";
import Error from "next/error"; import Error from "next/error";
import { useEffect } from "react"; import { useEffect } from "react";
export default function GlobalError({ error }) { const GlobalError = ({ error }) => {
useEffect(() => { useEffect(() => {
Sentry.captureException(error); Sentry.captureException(error);
}, [error]); }, [error]);
@ -16,4 +16,6 @@ export default function GlobalError({ error }) {
</body> </body>
</html> </html>
); );
} };
export default GlobalError;