Skip to content

Instantly share code, notes, and snippets.

@iamkevingreen
Created January 27, 2017 20:28
Show Gist options
  • Save iamkevingreen/581e3a7404a522440b988b950ae35363 to your computer and use it in GitHub Desktop.
Save iamkevingreen/581e3a7404a522440b988b950ae35363 to your computer and use it in GitHub Desktop.
import React, { Component, PropTypes as T} from 'react'
import AuthService from '../../../utils/AuthService'
import { Link } from 'react-router'
export default class Login extends Component {
render() {
const { auth } = this.props
return (
<div className="login">
<h2>Login</h2>
<button onClick={auth.login.bind(this)}>Login</button>
<Link to="/">Back Home</Link>
</div>
)
}
}
Login.propTypes = {
location: T.object,
auth: T.instanceOf(AuthService)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment