'use client';

import { I18nextProvider } from 'react-i18next';
import i18n from '@/lib/i18n';

export default function I18nProvider({
    children,
    locale,
}: {
    children: React.ReactNode;
    locale: string;
}) {
    // 设置语言
    i18n.changeLanguage(locale);

    return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>;
}
