From e95b965fe875259b7fcc9964ae5b80705fb1a87f Mon Sep 17 00:00:00 2001 From: Stan Girard Date: Fri, 23 Feb 2024 17:32:29 -0800 Subject: [PATCH] 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. --- frontend/app/global-error.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/app/global-error.jsx b/frontend/app/global-error.jsx index 2e6130a15..f63e01a60 100644 --- a/frontend/app/global-error.jsx +++ b/frontend/app/global-error.jsx @@ -4,7 +4,7 @@ import * as Sentry from "@sentry/nextjs"; import Error from "next/error"; import { useEffect } from "react"; -export default function GlobalError({ error }) { +const GlobalError = ({ error }) => { useEffect(() => { Sentry.captureException(error); }, [error]); @@ -16,4 +16,6 @@ export default function GlobalError({ error }) { ); -} +}; + +export default GlobalError;