Created
October 21, 2016 13:33
-
-
Save bnhansn/6a354b853d5ecf0aca12e6777b4c995e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| import React, { Component, PropTypes } from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { signup } from '../../actions/session'; | |
| import SignupForm from '../../components/SignupForm'; | |
| import Navbar from '../../components/Navbar'; | |
| type Props = { | |
| signup: () => void, | |
| } | |
| class Signup extends Component { | |
| static contextTypes = { | |
| router: PropTypes.object, | |
| } | |
| props: Props | |
| handleSignup = data => this.props.signup(data, this.context.router); | |
| render() { | |
| return ( | |
| <div style={{ flex: '1' }}> | |
| <Navbar /> | |
| <SignupForm onSubmit={this.handleSignup} /> | |
| </div> | |
| ); | |
| } | |
| } | |
| export default connect(null, { signup })(Signup); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment