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 { useEffect } from "react"
import { useIntl } from "react-intl"
import styles from "./global-error.module.css"
@@ -13,8 +12,6 @@ export default function GlobalError({
}) {
console.log({ global_error: error })
const intl = useIntl()
useEffect(() => {
Sentry.captureException(error)
}, [error])
@@ -23,11 +20,9 @@ export default function GlobalError({
<html>
<body>
<div className={styles.layout}>
<h1>
{intl.formatMessage({
defaultMessage: "Something went really wrong!",
})}
</h1>
{/* 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>