Skip to content

Commit

Permalink
[feature/react-intl] Fix ProvideIntl PropTypes validation (#625)
Browse files Browse the repository at this point in the history
* Fix ProvideIntl PropTypes validation

* Remove unnecessary line
  • Loading branch information
langpavel authored and koistya committed Apr 26, 2016
1 parent 925806e commit 86e2d4b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/Provide/IntlProvider.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { IntlProvider, intlShape } from 'react-intl';
import { IntlProvider } from 'react-intl';

function ProvideIntl({ intl, children }) {
return (
<IntlProvider
key={intl.locale}
locale={intl.locale}
initialNow={intl.initialNow}
{...intl}
messages={intl.messages[intl.locale]}
>
{children}
Expand All @@ -16,11 +14,10 @@ function ProvideIntl({ intl, children }) {
}

ProvideIntl.propTypes = {
intl: intlShape,
...IntlProvider.propTypes,
children: PropTypes.element.isRequired,
};

export default connect(state => ({
runtime: state.runtime,
intl: state.intl,
}))(ProvideIntl);

0 comments on commit 86e2d4b

Please sign in to comment.