@hhgtech/hhg-components
Version:
Hello Health Group common components
19 lines (16 loc) • 631 B
JavaScript
import { T as TranslationsContext } from './translationsContext-18f7b7e0.js';
export { T as TranslationsContext } from './translationsContext-18f7b7e0.js';
import React__default, { useMemo } from 'react';
const TranslationsProvider = ({ locale = 'en-PH', values, children, }) => {
const contextValue = useMemo(() => {
if (!values) {
return null;
}
return {
locale,
values,
};
}, [locale, values]);
return (React__default.createElement(TranslationsContext.Provider, { value: contextValue }, children));
};
export { TranslationsProvider };