chore: create a utils/languages file

This commit is contained in:
Chuma McPhoy
2024-07-04 15:19:17 +02:00
parent f89d17cd7f
commit bfcef5b832
12 changed files with 31 additions and 54 deletions

View File

@@ -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>