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
This commit is contained in:
Anton Gunnarsson
2025-04-29 08:51:16 +00:00
parent 4ab58cf330
commit dcd2dba950

View File

@@ -2,7 +2,6 @@
import * as Sentry from "@sentry/nextjs" import * as Sentry from "@sentry/nextjs"
import { useEffect } from "react" import { useEffect } from "react"
import { useIntl } from "react-intl"
import styles from "./global-error.module.css" import styles from "./global-error.module.css"
@@ -13,8 +12,6 @@ export default function GlobalError({
}) { }) {
console.log({ global_error: error }) console.log({ global_error: error })
const intl = useIntl()
useEffect(() => { useEffect(() => {
Sentry.captureException(error) Sentry.captureException(error)
}, [error]) }, [error])
@@ -23,11 +20,9 @@ export default function GlobalError({
<html> <html>
<body> <body>
<div className={styles.layout}> <div className={styles.layout}>
<h1> {/* This renders instead of the root layout so there is no <IntlProvider>, hence we can't translate this. */}
{intl.formatMessage({ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
defaultMessage: "Something went really wrong!", <h1>Something went really wrong!</h1>
})}
</h1>
</div> </div>
</body> </body>
</html> </html>