mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-30 01:32:52 +03:00
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:
parent
1b6896f8ca
commit
e95b965fe8
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user