fix errors

This commit is contained in:
Kalidou Diagne
2024-01-15 22:11:36 +00:00
parent 1c3a1391eb
commit 3da465eee5
5 changed files with 10 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import {
useTranslation as useTranslationOrg,
} from "react-i18next"
import { cookieName, getOptions, languages } from "./settings"
import { LocaleTypes, cookieName, getOptions, languages } from "./settings"
const runsOnServerSide = typeof window === "undefined"
@@ -33,7 +33,11 @@ i18next
preload: runsOnServerSide ? languages : [],
})
export function useTranslation(lng: string, ns: string, options = {}) {
export function useTranslation(
lng: LocaleTypes | string,
ns: string,
options = {}
) {
const [cookies, setCookie] = useCookies([cookieName])
const ret = useTranslationOrg(ns, options)
const { i18n } = ret

View File

@@ -1,3 +1 @@
{
}
{}