From f119fc78dda4d1e828dde04f378a63a93e3a0a7e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 2 Jul 2020 18:39:28 +0200 Subject: Add current progress on frontend port --- frontend/src/pages/Experiments.js | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'frontend/src/pages/Experiments.js') diff --git a/frontend/src/pages/Experiments.js b/frontend/src/pages/Experiments.js index 67e3fd77..97e63f44 100644 --- a/frontend/src/pages/Experiments.js +++ b/frontend/src/pages/Experiments.js @@ -30,28 +30,21 @@ class ExperimentsComponent extends React.Component { } >
- +
- - + +
- +
) } } -const mapStateToProps = state => { +const mapStateToProps = (state) => { let simulationName = undefined - if ( - state.currentSimulationId !== -1 && - state.objects.simulation[state.currentSimulationId] - ) { + if (state.currentSimulationId !== -1 && state.objects.simulation[state.currentSimulationId]) { simulationName = state.objects.simulation[state.currentSimulationId].name } @@ -60,16 +53,13 @@ const mapStateToProps = state => { } } -const mapDispatchToProps = dispatch => { +const mapDispatchToProps = (dispatch) => { return { - storeSimulationId: id => dispatch(openSimulationSucceeded(id)), - fetchExperimentsOfSimulation: id => - dispatch(fetchExperimentsOfSimulation(id)), + storeSimulationId: (id) => dispatch(openSimulationSucceeded(id)), + fetchExperimentsOfSimulation: (id) => dispatch(fetchExperimentsOfSimulation(id)), } } -const Experiments = connect(mapStateToProps, mapDispatchToProps)( - ExperimentsComponent, -) +const Experiments = connect(mapStateToProps, mapDispatchToProps)(ExperimentsComponent) export default Experiments -- cgit v1.2.3