Remove translation from global-error * Remove translation from global-error Approved-by: Michael Zetterberg Approved-by: Joakim Jäderberg Approved-by: Linus Flood
31 lines
709 B
TypeScript
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>
|
|
)
|
|
}
|