feat(WEB-220): label translations
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useParams, usePathname } from "next/navigation"
|
||||
import { useEffect } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { findLang } from "@/constants/languages"
|
||||
import { login } from "@/constants/routes/handleAuth"
|
||||
@@ -16,6 +17,7 @@ export default function Error({
|
||||
}: {
|
||||
error: Error & { digest?: string }
|
||||
}) {
|
||||
const intl = useIntl()
|
||||
const params = useParams<LangParams>()
|
||||
|
||||
useEffect(() => {
|
||||
@@ -32,8 +34,12 @@ export default function Error({
|
||||
const lang = findLang(pathname)
|
||||
|
||||
return (
|
||||
<div className={styles.layout}>
|
||||
<div className={styles.content}>{lang}: Something went wrong!</div>
|
||||
</div>
|
||||
<section
|
||||
className={styles.layout}
|
||||
>
|
||||
<div className={styles.content}>
|
||||
{lang}: {intl.formatMessage({ id: "Something went wrong!" })}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user