import { connect } from 'react-redux';
import GlobalLoading from './GlobalLoading';
import { fetchCurrentUser } from '../../store/users/actions';
-import { fetchLanguages, fetchAppState, fetchOrganizations } from '../../store/rootActions';
+import { fetchLanguages, fetchAppState } from '../../store/rootActions';
class App extends React.PureComponent {
mounted: boolean;
fetchAppState: React.PropTypes.func.isRequired,
fetchCurrentUser: React.PropTypes.func.isRequired,
fetchLanguages: React.PropTypes.func.isRequired,
- fetchOrganizations: React.PropTypes.func.isRequired,
children: React.PropTypes.element.isRequired
};
this.props
.fetchCurrentUser()
- .then(() =>
- Promise.all([
- this.props.fetchAppState(),
- this.props.fetchOrganizations(),
- this.props.fetchLanguages()
- ])
- )
+ .then(() => Promise.all([this.props.fetchAppState(), this.props.fetchLanguages()]))
.then(this.finishLoading, this.finishLoading);
}
export default connect(null, {
fetchAppState,
fetchCurrentUser,
- fetchLanguages,
- fetchOrganizations
+ fetchLanguages
})(App);