From bbf3c187c4967509a8097b168533786daacc2ec6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 11:17:31 +0200 Subject: rpc --- app/client/live/index.js | 213 +++++++++++++++++++++++++---------------------- 1 file changed, 112 insertions(+), 101 deletions(-) (limited to 'app/client/live/index.js') diff --git a/app/client/live/index.js b/app/client/live/index.js index 80f531a..8d16785 100644 --- a/app/client/live/index.js +++ b/app/client/live/index.js @@ -1,126 +1,137 @@ import { h, Component } from 'preact' +import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import Player from './components/player.component' import ParamGroup from '../common/paramGroup.component' import Slider from '../common/slider.component' -function App(props) { - return ( -
- -
+import * as liveActions from './actions' - - - - - +class App extends Component { + constructor(props){ + super() + props.actions.get_params() + } + render(){ + const props = this.props + return ( +
+ +
- - - - - + + + + + - - - - + + + + + - - - + + + + - - - - + + + - - - - + + + + - - - - + + + + + + + + + +
-
- ) + ) + } } const mapStateToProps = state => ({ }) const mapDispatchToProps = (dispatch, ownProps) => ({ + actions: bindActionCreators(liveActions, dispatch) }) export default connect(mapStateToProps, mapDispatchToProps)(App) -- cgit v1.2.3-70-g09d2