File size: 632 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from 'react';
import {withRouter} from 'react-router-dom';
import {demologin} from '../../actions/session_actions';
class DemoLogin extends React.Component{
  constructor(props){
    super(props);
    this.handleSubmit = this.handleSubmit.bind(this);
  }
  handleSubmit(e) {
    e.preventDefault();
    this.props.processForm();
  }
  render(){
   return(
     <div>
       <form onSubmit={this.handleSubmit}>
           <button type="submit">Want to try the site before registering? 
            Click here to sign in as demo user.</button>
       </form>
     </div>
  );
  }
}

export default withRouter(DemoLogin);