'use client' import type { FC } from 'react' import React, { useEffect } from 'react' import { changeLanguage } from '@/i18n/i18next-config' import I18NContext from '@/context/i18n' import type { Locale } from '@/i18n' import { setLocaleOnClient } from '@/i18n/client' export type II18nProps = { locale: Locale dictionary: Record children: React.ReactNode } const I18n: FC = ({ locale, dictionary, children, }) => { useEffect(() => { changeLanguage(locale) }, [locale]) return ( {children} ) } export default React.memo(I18n)