1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-26 07:51:36 +00:00

force rerender on lang change

This commit is contained in:
slowbackspace 2019-04-08 18:41:00 +02:00
parent 5fb0c4cb96
commit db70dd706b

View File

@ -62,7 +62,11 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (
}); });
const ReactIntlProvider = ({ children, locale, messages }: Props) => ( const ReactIntlProvider = ({ children, locale, messages }: Props) => (
<IntlProvider locale={locale} messages={messages}> <IntlProvider
locale={locale}
messages={messages}
key={locale} // forces rerender IntlProvider when lang file is downloaded
>
{children} {children}
</IntlProvider> </IntlProvider>
); );