Files
web/apps/scandic-web/app/global-error.tsx
Anton Gunnarsson dcd2dba950 Merged in fix/remove-translation-from-global-error (pull request #1896)
Remove translation from global-error

* Remove translation from global-error


Approved-by: Michael Zetterberg
Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
2025-04-29 08:51:16 +00:00

31 lines
709 B
TypeScript

"use client"
import * as Sentry from "@sentry/nextjs"
import { useEffect } from "react"
import styles from "./global-error.module.css"
export default function GlobalError({
error,
}: {
error: Error & { digest?: string }
}) {
console.log({ global_error: error })
useEffect(() => {
Sentry.captureException(error)
}, [error])
return (
<html>
<body>
<div className={styles.layout}>
{/* This renders instead of the root layout so there is no <IntlProvider>, hence we can't translate this. */}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<h1>Something went really wrong!</h1>
</div>
</body>
</html>
)
}