Auth Id grabbing record from database
This commit is contained in:
1 parent
2437ac7a31
commit
9e4c86b8d9
3 files changed
+17
-9
No files matched your search
@@ -8,8 +8,12 @@ class LoggedInUser extends Component {
|
||||
displayLoggedInUser(){
|
||||
|
||||
const user = this.props.data.userByAuthId;
|
||||
|
||||
|
||||
console.log(this.props);
|
||||
|
||||
console.log(this.props.data);
|
||||
console.log(this.props.data.userByAuthId);
|
||||
|
||||
if(user){
|
||||
if (user.firstName) {
|
||||
return(
|
||||
@@ -45,7 +49,7 @@ export default graphql(getUserByAuthIdQuery, { // What follows is the way to pas
|
||||
options: (props) => {
|
||||
return {
|
||||
variables: {
|
||||
id: props.authId
|
||||
authId: props.authId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ class ButtonAppBar extends Component {
|
||||
let user = JSON.parse(getUser)
|
||||
const authId = user.sub;
|
||||
|
||||
console.log(authId);
|
||||
this.setState({ authId: authId });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user