Auth0 client integration ready

This commit is contained in:
Luis Fernando Molina committed 2018-09-06 20:34:06 +02:00
1 parent 3f9423e91d
commit eca2e6deff
12 files changed
+614 -10

No files matched your search

+4 -2
View File
@@ -1,13 +1,14 @@
import React, { Component } from 'react';
import {graphql} from 'react-apollo';
import {getUserByAuthIdQuery} from '../queries/queries';
import {auth} from '../App';
class LoggedInUser extends Component {
displayLoggedInUser(){
const user = this.props.data.userByAuthId;
console.log(this.props);
if(user){
if (user.firstName) {
return(
@@ -24,7 +25,8 @@ class LoggedInUser extends Component {
}
} else {
return( <div>Login / Sign up</div> );
console.log(auth);
return( <div onClick={() => auth.login()}>Login / Sign up</div> );
}
}