From a7b5b02a6e67e9faab61ea7683cac1d4bc06ec64 Mon Sep 17 00:00:00 2001 From: Vinay Date: Sun, 8 Jul 2018 23:19:15 +0800 Subject: [PATCH] Refactor --- src/provider.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/provider.js b/src/provider.js index c1b5519..a89c40a 100644 --- a/src/provider.js +++ b/src/provider.js @@ -2,13 +2,12 @@ import React, { Children } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { supplant, translateKey, createHTMLMarkup } from './utils' -import { setLocale } from './actions' import { TranslateProvider } from './context' class IntlProvider extends React.Component { constructor (props) { super(props) - const { translations, locale, setLocale } = props + const { translations, locale } = props if (!translations || !locale) { let namePart = this.constructor.displayName ? ' of ' + this.constructor.displayName : '' throw new Error('Could not find translations or locale on this.props ' + namePart) @@ -49,4 +48,4 @@ function mapPropsToState (state) { } } -export default connect(mapPropsToState, { setLocale })(IntlProvider) +export default connect(mapPropsToState)(IntlProvider)