Sha256: aa7bde56d4a3dd1e663d8f658074b9960ad6b62e4d8e93781e20ac64dad325de
Contents?: true
Size: 1.13 KB
Versions: 58
Compression:
Stored size: 1.13 KB
Contents
import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { selectAPIResponse, selectAPIStatus, selectAPIErrorMessage, } from 'foremanReact/redux/API/APISelectors'; import * as actions from './RemediationActions'; import RemediationModal from './RemediationModal'; import { REMEDIATIONS_API_KEY } from './RemediationTableConstants'; import { selectIsAllSelected, selectSearch, selectSelectedIds, } from '../InsightsTable/InsightsTableSelectors'; // map state to props const mapStateToProps = state => ({ selectedIds: selectSelectedIds(state), remediations: selectAPIResponse(state, REMEDIATIONS_API_KEY).hits || [], status: selectAPIStatus(state, REMEDIATIONS_API_KEY), error: selectAPIErrorMessage(state, REMEDIATIONS_API_KEY), itemCount: selectAPIResponse(state, REMEDIATIONS_API_KEY).itemCount || 0, isAllSelected: selectIsAllSelected(state), query: selectSearch(state), }); // map action dispatchers to props const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch); // export connected component export default connect(mapStateToProps, mapDispatchToProps)(RemediationModal);
Version data entries
58 entries across 58 versions & 1 rubygems