Auth0 client integration ready
This commit is contained in:
1 parent
3f9423e91d
commit
eca2e6deff
12 files changed
+614
-10
No files matched your search
@@ -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> );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user