Merged in fix/intl-global-error (pull request #1510)

Fix: Error message when copy fail. Null check on localstorage. Removed Intl from global-error.tsx

* Error message if failed to copy

* Use try/catch instead


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-03-11 10:49:56 +00:00
parent 2ef2b2e28d
commit 7563db9dbc
11 changed files with 26 additions and 11 deletions

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,7 +20,7 @@ export default function GlobalError({
<html>
<body>
<div className={styles.layout}>
<h1>{intl.formatMessage({ id: "Something went really wrong!" })}</h1>
<h1>Something went really wrong!</h1>
</div>
</body>
</html>