aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js b/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js
index 2145fd817ea..4eaf763bb2b 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js
@@ -21,18 +21,17 @@ import { connect } from 'react-redux';
import { setState, addQualityGate, deleteQualityGate } from '../store/actions';
import QualityGateApp from '../components/QualityGatesApp';
+import { getQualityGatesAppState } from '../../../app/store/rootReducer';
-function mapStateToProps (state) {
- return state.rootReducer;
-}
+const mapStateToProps = state => (
+ getQualityGatesAppState(state)
+);
-function mapDispatchToProps (dispatch) {
- return {
- updateStore: nextState => dispatch(setState(nextState)),
- addQualityGate: qualityGate => dispatch(addQualityGate(qualityGate)),
- deleteQualityGate: qualityGate => dispatch(deleteQualityGate(qualityGate))
- };
-}
+const mapDispatchToProps = dispatch => ({
+ updateStore: nextState => dispatch(setState(nextState)),
+ addQualityGate: qualityGate => dispatch(addQualityGate(qualityGate)),
+ deleteQualityGate: qualityGate => dispatch(deleteQualityGate(qualityGate))
+});
export default connect(
mapStateToProps,