From de8f12d74faef5fa3f9e38d1340948cab2d06ea3 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 1 Jul 2020 13:33:31 +0200 Subject: Manually generate IDs --- .../components/app/timeline/TimelineComponent.js | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'frontend/src/components/app/timeline/TimelineComponent.js') diff --git a/frontend/src/components/app/timeline/TimelineComponent.js b/frontend/src/components/app/timeline/TimelineComponent.js index 0f88b8f4..c183c0e8 100644 --- a/frontend/src/components/app/timeline/TimelineComponent.js +++ b/frontend/src/components/app/timeline/TimelineComponent.js @@ -1,37 +1,37 @@ -import React from "react"; -import TimelineControlsContainer from "../../../containers/app/timeline/TimelineControlsContainer"; -import TimelineLabelsContainer from "../../../containers/app/timeline/TimelineLabelsContainer"; -import "./Timeline.css"; +import React from 'react' +import TimelineControlsContainer from '../../../containers/app/timeline/TimelineControlsContainer' +import TimelineLabelsContainer from '../../../containers/app/timeline/TimelineLabelsContainer' +import './Timeline.css' class TimelineComponent extends React.Component { - componentDidMount() { - this.interval = setInterval(() => { - if (!this.props.isPlaying) { - return; - } + componentDidMount() { + this.interval = setInterval(() => { + if (!this.props.isPlaying) { + return + } - if (this.props.currentTick < this.props.lastSimulatedTick) { - this.props.incrementTick(); - } else { - this.props.pauseSimulation(); - } - }, 1000); - } + if (this.props.currentTick < this.props.lastSimulatedTick) { + this.props.incrementTick() + } else { + this.props.pauseSimulation() + } + }, 1000) + } - componentWillUnmount() { - clearInterval(this.interval); - } + componentWillUnmount() { + clearInterval(this.interval) + } - render() { - return ( -
-
- - -
-
- ); - } + render() { + return ( +
+
+ + +
+
+ ) + } } -export default TimelineComponent; +export default TimelineComponent -- cgit v1.2.3