From 1b6545fa653df44b019f6676faed39880999b2bf Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Mon, 21 Aug 2017 12:08:41 +0200 Subject: Add basic react-konva rendering prototype --- src/pages/App.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/pages/App.js (limited to 'src/pages/App.js') diff --git a/src/pages/App.js b/src/pages/App.js new file mode 100644 index 00000000..a2a1050b --- /dev/null +++ b/src/pages/App.js @@ -0,0 +1,45 @@ +import PropTypes from "prop-types"; +import React from 'react'; +import {connect} from "react-redux"; +import {openSimulationSucceeded} from "../actions/simulations"; +import {fetchAuthorizationsOfCurrentUser} from "../actions/users"; +import MapStage from "../components/map/MapStage"; +import Navbar from "../components/navigation/Navbar"; +import Login from "../containers/auth/Login"; + +class AppContainer extends React.Component { + static propTypes = { + simulationId: PropTypes.number.isRequired, + }; + + componentDidMount() { + this.props.storeSimulationId(this.props.simulationId); + this.props.fetchAuthorizationsOfCurrentUser(); + } + + render() { + return ( +
+ +
+ +
+ +
+ ); + } +} + +const mapDispatchToProps = dispatch => { + return { + storeSimulationId: id => dispatch(openSimulationSucceeded(id)), + fetchAuthorizationsOfCurrentUser: () => dispatch(fetchAuthorizationsOfCurrentUser()), + }; +}; + +const App = connect( + undefined, + mapDispatchToProps +)(AppContainer); + +export default App; -- cgit v1.2.3