fix intl hook call (#19632)

This commit is contained in:
Ramón Souza 2024-02-15 14:11:18 -03:00 committed by GitHub
parent 78c69db6ce
commit 0edb3805ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,18 +185,28 @@ class IntlStartup extends Component {
}
}
const IntlStartupContainer = withTracker(() => {
const IntlStartupContainer = (props) => {
const setLocalSettings = useUserChangedLocalSettings();
return (
<IntlStartup
{...{
setLocalSettings,
...props,
}}
/>
);
};
export default withTracker(() => {
const { locale } = Settings.application;
const overrideLocaleFromPassedParameter = getFromUserSettings('bbb_override_default_locale', null);
const setLocalSettings = useUserChangedLocalSettings();
return {
locale,
overrideLocaleFromPassedParameter,
setLocalSettings,
};
})(IntlStartup);
export default IntlStartupContainer;
})(IntlStartupContainer);
IntlStartup.propTypes = propTypes;
IntlStartup.defaultProps = defaultProps;