From dcd2dba950bd468c9844217d5c058c20feb445f9 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Tue, 29 Apr 2025 08:51:16 +0000 Subject: [PATCH] Merged in fix/remove-translation-from-global-error (pull request #1896) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove translation from global-error * Remove translation from global-error Approved-by: Michael Zetterberg Approved-by: Joakim Jäderberg Approved-by: Linus Flood --- apps/scandic-web/app/global-error.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/scandic-web/app/global-error.tsx b/apps/scandic-web/app/global-error.tsx index 7b569cd0d..8d7844cff 100644 --- a/apps/scandic-web/app/global-error.tsx +++ b/apps/scandic-web/app/global-error.tsx @@ -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({
-

- {intl.formatMessage({ - defaultMessage: "Something went really wrong!", - })} -

+ {/* This renders instead of the root layout so there is no , hence we can't translate this. */} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} +

Something went really wrong!