Skip to content

Commit 0a7d32a

Browse files
authored
nm
1 parent edda6ce commit 0a7d32a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/TrainSimulator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ function TrainSimulator() {
1616
console.log(simulationData);
1717
}, 1000);
1818

19+
function stopSimulation() {
20+
clearInterval(intervalId);
21+
}
1922

2023
}
2124

22-
function stopSimulation() {
23-
clearInterval(intervalId);
24-
}
25-
25+
2626

2727
return (
2828
<div className="container">
@@ -80,7 +80,7 @@ function TrainSimulator() {
8080
<div className="col-4 offset-4">
8181
<div className="btn-group btn-block" role="group" aria-label="Play and Stop buttons">
8282
<button type="button" className="btn btn-success" onClick={startSimulation}>Play</button>
83-
<button type="button" className="btn btn-fail" onClick={stopSimulation}>Stop</button>
83+
8484
</div>
8585
</div>
8686
</div>

0 commit comments

Comments
 (0)