blob: 6d4a9f2534098981c65e7618c2dc5b50952ee380 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import {connect} from "react-redux";
import {pauseSimulation, playSimulation} from "../../actions/simulation/playback";
import PlayButtonComponent from "../../components/timeline/PlayButtonComponent";
const mapStateToProps = state => {
return {
isPlaying: state.isPlaying,
};
};
const mapDispatchToProps = dispatch => {
return {
onPlay: () => dispatch(playSimulation()),
onPause: () => dispatch(pauseSimulation()),
};
};
const PlayButtonContainer = connect(
mapStateToProps,
mapDispatchToProps
)(PlayButtonComponent);
export default PlayButtonContainer;
|