Created
January 27, 2017 20:27
-
-
Save iamkevingreen/1e0d97ee4e9a8547dcc695cbfbeb2322 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
import React, { Component } from 'react' | |
import { Link } from 'react-router' | |
import AuthService from '../../utils/AuthService' | |
export default class Home extends Component { | |
constructor(props, context) { | |
super(props, context) | |
this.state = { | |
profile: props.auth.getProfile() | |
} | |
} | |
render() { | |
return ( | |
<div className="home"> | |
<h1>Welcome to Electron React!</h1> | |
<div className="home--features"> | |
<Link to="login">Login with Auth0</Link> | |
<p>If you are logged in you will see cool stuff:</p> | |
<ul> | |
<li>name: {this.state.profile.given_name} {this.state.profile.family_name}</li> | |
<li>email: {this.state.profile.email}</li> | |
</ul> | |
</div> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment