mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-12 09:49:39 +02:00
20 lines
358 B
JavaScript
20 lines
358 B
JavaScript
import { createElement, useMemo } from 'react';
|
|
import { I18nContext } from './context.js';
|
|
|
|
export function I18nextProvider({ i18n, defaultNS, children }) {
|
|
const value = useMemo(
|
|
() => ({
|
|
i18n,
|
|
defaultNS,
|
|
}),
|
|
[i18n, defaultNS],
|
|
);
|
|
return createElement(
|
|
I18nContext.Provider,
|
|
{
|
|
value,
|
|
},
|
|
children,
|
|
);
|
|
}
|