Skip to content

Instantly share code, notes, and snippets.

@iamkevingreen
Created January 27, 2017 20:27
Show Gist options
  • Save iamkevingreen/1e0d97ee4e9a8547dcc695cbfbeb2322 to your computer and use it in GitHub Desktop.
Save iamkevingreen/1e0d97ee4e9a8547dcc695cbfbeb2322 to your computer and use it in GitHub Desktop.
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