Update components on language change
This commit is contained in:
parent
7e95ce9136
commit
b5e7237169
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Trans } from 'react-i18next';
|
||||
import { Trans, withNamespaces } from 'react-i18next';
|
||||
|
||||
import Tabs from '../../components/ui/Tabs';
|
||||
import Icons from '../../components/ui/Icons';
|
||||
|
@ -90,4 +90,4 @@ const Devices = () => (
|
|||
</div>
|
||||
);
|
||||
|
||||
export default Devices;
|
||||
export default withNamespaces()(Devices);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Trans } from 'react-i18next';
|
||||
import { Trans, withNamespaces } from 'react-i18next';
|
||||
import Controls from './Controls';
|
||||
|
||||
class Greeting extends Component {
|
||||
|
@ -20,4 +20,4 @@ class Greeting extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Greeting;
|
||||
export default withNamespaces()(Greeting);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Trans } from 'react-i18next';
|
||||
import { Trans, withNamespaces } from 'react-i18next';
|
||||
|
||||
import { INSTALL_TOTAL_STEPS } from '../../helpers/constants';
|
||||
|
||||
|
@ -22,4 +22,4 @@ Progress.propTypes = {
|
|||
step: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
export default Progress;
|
||||
export default withNamespaces()(Progress);
|
||||
|
|
|
@ -2,7 +2,8 @@ import React from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Field, reduxForm, formValueSelector } from 'redux-form';
|
||||
import { Trans } from 'react-i18next';
|
||||
import { Trans, withNamespaces } from 'react-i18next';
|
||||
import flow from 'lodash/flow';
|
||||
|
||||
import Controls from './Controls';
|
||||
import renderField from './renderField';
|
||||
|
@ -153,8 +154,11 @@ Settings = connect((state) => {
|
|||
};
|
||||
})(Settings);
|
||||
|
||||
export default reduxForm({
|
||||
export default flow([
|
||||
withNamespaces(),
|
||||
reduxForm({
|
||||
form: 'install',
|
||||
destroyOnUnmount: false,
|
||||
forceUnregisterOnUnmount: true,
|
||||
})(Settings);
|
||||
}),
|
||||
])(Settings);
|
||||
|
|
|
@ -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({
|
||||
export default flow([
|
||||
withNamespaces(),
|
||||
reduxForm({
|
||||
form: 'install',
|
||||
destroyOnUnmount: false,
|
||||
forceUnregisterOnUnmount: true,
|
||||
})(Submit);
|
||||
}),
|
||||
])(Submit);
|
||||
|
|
Loading…
Reference in New Issue