summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/timeline/TimelineContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/containers/app/timeline/TimelineContainer.js')
-rw-r--r--frontend/src/containers/app/timeline/TimelineContainer.js62
1 files changed, 31 insertions, 31 deletions
diff --git a/frontend/src/containers/app/timeline/TimelineContainer.js b/frontend/src/containers/app/timeline/TimelineContainer.js
index 74d37d58..4fcaaaaf 100644
--- a/frontend/src/containers/app/timeline/TimelineContainer.js
+++ b/frontend/src/containers/app/timeline/TimelineContainer.js
@@ -1,41 +1,41 @@
-import { connect } from "react-redux";
-import { pauseSimulation } from "../../../actions/simulation/playback";
-import { incrementTick } from "../../../actions/simulation/tick";
-import { setCurrentDatacenter } from "../../../actions/topology/building";
-import TimelineComponent from "../../../components/app/timeline/TimelineComponent";
+import { connect } from 'react-redux'
+import { pauseSimulation } from '../../../actions/simulation/playback'
+import { incrementTick } from '../../../actions/simulation/tick'
+import { setCurrentDatacenter } from '../../../actions/topology/building'
+import TimelineComponent from '../../../components/app/timeline/TimelineComponent'
const mapStateToProps = state => {
- let sections = [];
- if (state.currentExperimentId !== -1) {
- const sectionIds =
- state.objects.path[
- state.objects.experiment[state.currentExperimentId].pathId
- ].sectionIds;
+ let sections = []
+ if (state.currentExperimentId !== -1) {
+ const sectionIds =
+ state.objects.path[
+ state.objects.experiment[state.currentExperimentId].pathId
+ ].sectionIds
- if (sectionIds) {
- sections = sectionIds.map(sectionId => state.objects.section[sectionId]);
+ if (sectionIds) {
+ sections = sectionIds.map(sectionId => state.objects.section[sectionId])
+ }
}
- }
- return {
- isPlaying: state.isPlaying,
- currentTick: state.currentTick,
- lastSimulatedTick: state.lastSimulatedTick,
- currentDatacenterId: state.currentDatacenterId,
- sections
- };
-};
+ return {
+ isPlaying: state.isPlaying,
+ currentTick: state.currentTick,
+ lastSimulatedTick: state.lastSimulatedTick,
+ currentDatacenterId: state.currentDatacenterId,
+ sections,
+ }
+}
const mapDispatchToProps = dispatch => {
- return {
- incrementTick: () => dispatch(incrementTick()),
- pauseSimulation: () => dispatch(pauseSimulation()),
- setCurrentDatacenter: id => dispatch(setCurrentDatacenter(id))
- };
-};
+ return {
+ incrementTick: () => dispatch(incrementTick()),
+ pauseSimulation: () => dispatch(pauseSimulation()),
+ setCurrentDatacenter: id => dispatch(setCurrentDatacenter(id)),
+ }
+}
const TimelineContainer = connect(mapStateToProps, mapDispatchToProps)(
- TimelineComponent
-);
+ TimelineComponent,
+)
-export default TimelineContainer;
+export default TimelineContainer