Sha256: 4812fba36411e59a3919516aa8a4ad8bf318b46b7f79ad2615b59b723d8537d5
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import * as actions from './DashboardActions'; import { restartProcess } from '../AccountList/AccountListActions'; import reducer from './DashboardReducer'; import Dashboard from './Dashboard'; import { selectUploading, selectGenerating, selectPollingProcessID, selectActiveTab, selectShowFullScreen, } from './DashboardSelectors'; // map state to props const mapStateToProps = (state, { accountID }) => ({ uploading: selectUploading(state, accountID), generating: selectGenerating(state, accountID), pollingProcessID: selectPollingProcessID(state, accountID), activeTab: selectActiveTab(state, accountID), showFullScreen: selectShowFullScreen(state, accountID), }); // map action dispatchers to props const mapDispatchToProps = dispatch => bindActionCreators({ ...actions, restartProcess }, dispatch); // export reducers export const reducers = { dashboard: reducer }; // export connected component export default connect( mapStateToProps, mapDispatchToProps )(Dashboard);
Version data entries
6 entries across 6 versions & 1 rubygems