fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
"use client" // Error components must be Client Components
|
||||
"use client"
|
||||
|
||||
import * as Sentry from "@sentry/nextjs"
|
||||
import {
|
||||
useParams,
|
||||
usePathname,
|
||||
useRouter,
|
||||
useSearchParams,
|
||||
} from "next/navigation"
|
||||
import { useParams, useRouter, useSearchParams } from "next/navigation"
|
||||
import { startTransition, useEffect, useRef } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { login } from "@/constants/routes/handleAuth"
|
||||
import { SESSION_EXPIRED } from "@/server/errors/trpc"
|
||||
|
||||
import { findLang } from "@/utils/languages"
|
||||
|
||||
import styles from "./error.module.css"
|
||||
|
||||
import type { LangParams } from "@/types/params"
|
||||
@@ -63,13 +57,10 @@ export default function Error({
|
||||
currentSearchParamsRef.current = currentSearchParams
|
||||
}, [searchParams, reset, router])
|
||||
|
||||
const pathname = usePathname()
|
||||
const lang = findLang(pathname)
|
||||
|
||||
return (
|
||||
<section className={styles.layout}>
|
||||
<div className={styles.content}>
|
||||
{lang}: {intl.formatMessage({ id: "Something went wrong!" })}
|
||||
{intl.formatMessage({ id: "Something went wrong!" })}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user