diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-10-04 23:23:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-04 23:23:09 +0200 |
| commit | fcaaae65d34003874c76e0c01134dedf94248e09 (patch) | |
| tree | 2aae1422168651e832a1904623f6f5b100fc17ec /src/containers/modals/NewExperimentModal.js | |
| parent | 0a62dfb55c5700013d42a589b930c7448e5bff71 (diff) | |
| parent | 606d1de0be09f3597165248f65d54e158a13860c (diff) | |
Merge pull request #42 from atlarge-research/auto-reformat
Standardize code format
Diffstat (limited to 'src/containers/modals/NewExperimentModal.js')
| -rw-r--r-- | src/containers/modals/NewExperimentModal.js | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/src/containers/modals/NewExperimentModal.js b/src/containers/modals/NewExperimentModal.js index 13aed74d..c703c39a 100644 --- a/src/containers/modals/NewExperimentModal.js +++ b/src/containers/modals/NewExperimentModal.js @@ -1,36 +1,39 @@ -import {connect} from "react-redux"; -import {addExperiment} from "../../actions/experiments"; -import {closeNewExperimentModal} from "../../actions/modals/experiments"; +import { connect } from "react-redux"; +import { addExperiment } from "../../actions/experiments"; +import { closeNewExperimentModal } from "../../actions/modals/experiments"; import NewExperimentModalComponent from "../../components/modals/custom-components/NewExperimentModalComponent"; const mapStateToProps = state => { - return { - show: state.modals.newExperimentModalVisible, - paths: Object.values(state.objects.path).filter(path => path.simulationId === state.currentSimulationId), - traces: Object.values(state.objects.trace), - schedulers: Object.values(state.objects.scheduler), - }; + return { + show: state.modals.newExperimentModalVisible, + paths: Object.values(state.objects.path).filter( + path => path.simulationId === state.currentSimulationId + ), + traces: Object.values(state.objects.trace), + schedulers: Object.values(state.objects.scheduler) + }; }; const mapDispatchToProps = dispatch => { - return { - callback: (name, pathId, traceId, schedulerName) => { - if (name) { - dispatch(addExperiment({ - name, - pathId, - traceId, - schedulerName - })); - } - dispatch(closeNewExperimentModal()); - } - }; + return { + callback: (name, pathId, traceId, schedulerName) => { + if (name) { + dispatch( + addExperiment({ + name, + pathId, + traceId, + schedulerName + }) + ); + } + dispatch(closeNewExperimentModal()); + } + }; }; -const NewExperimentModal = connect( - mapStateToProps, - mapDispatchToProps -)(NewExperimentModalComponent); +const NewExperimentModal = connect(mapStateToProps, mapDispatchToProps)( + NewExperimentModalComponent +); export default NewExperimentModal; |
