diff -r 6fb4de54acea -r 48ddaa42b810 client/src/components/Login.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/Login.js Wed May 31 17:51:54 2017 +0200 @@ -0,0 +1,60 @@ +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { bindActionCreators } from 'redux'; +import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; +import '../App.css'; +import Navbar from './Navbar'; +import * as sessionsActions from '../actions/sessionsActions'; + +class Login extends Component { + + login = () => { + const username = this.username.value; + const password = this.password.value; + + console.log(username, password); + + } + + render() { + return ( +
+ + + + + +
+ + Username + { this.username = ref; }} /> + + + Password + { this.password = ref; }} /> + + +
+
+ +
+
+
+ ); + } +} + +function mapStateToProps(state, props) { + return { + currentSession: state.get('currentSession'), + sessions: state.get('sessions') + }; +} + +function mapDispatchToProps(dispatch) { + return { + actions: bindActionCreators(sessionsActions, dispatch) + } +} + +export default connect(mapStateToProps, mapDispatchToProps)(Login);