Update components on language change

This commit is contained in:
Ildar Kamalov
2019-01-22 17:54:18 +03:00
committed by Eugene Bujak
parent 7e95ce9136
commit b5e7237169
5 changed files with 26 additions and 18 deletions

View File

@@ -1,7 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { reduxForm } from 'redux-form';
import { Trans } from 'react-i18next';
import { Trans, withNamespaces } from 'react-i18next';
import flow from 'lodash/flow';
import Controls from './Controls';
@@ -37,8 +38,11 @@ Submit.propTypes = {
submitting: PropTypes.bool.isRequired,
};
export default reduxForm({
form: 'install',
destroyOnUnmount: false,
forceUnregisterOnUnmount: true,
})(Submit);
export default flow([
withNamespaces(),
reduxForm({
form: 'install',
destroyOnUnmount: false,
forceUnregisterOnUnmount: true,
}),
])(Submit);