chore: create a utils/languages file
This commit is contained in:
@@ -4,10 +4,11 @@ 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"
|
||||
import { SESSION_EXPIRED } from "@/server/errors/trpc"
|
||||
|
||||
import { findLang } from "@/utils/languages"
|
||||
|
||||
import styles from "./error.module.css"
|
||||
|
||||
import { LangParams } from "@/types/params"
|
||||
@@ -34,9 +35,7 @@ export default function Error({
|
||||
const lang = findLang(pathname)
|
||||
|
||||
return (
|
||||
<section
|
||||
className={styles.layout}
|
||||
>
|
||||
<section className={styles.layout}>
|
||||
<div className={styles.content}>
|
||||
{lang}: {intl.formatMessage({ id: "Something went wrong!" })}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user