No more duplication of recors at database
This commit is contained in:
1 parent
6f3c02cae0
commit
64101169d4
2 files changed
+55
-14
No files matched your search
@@ -55,7 +55,16 @@ class NavBar extends Component {
|
||||
|
||||
if (userStored !== null && userStored !== undefined && userStored !== 'undefined') {
|
||||
const user = JSON.parse(userStored);
|
||||
const authId = user.authId;
|
||||
|
||||
/* For some reason, the result of GraphQL some times varies, that is why I had to do the following hack. */
|
||||
|
||||
let authId;
|
||||
if (user.authId === undefined) {
|
||||
authId = user.sub;
|
||||
} else {
|
||||
authId = user.authId;
|
||||
}
|
||||
|
||||
console.log("user", user);
|
||||
console.log("authid", authId);
|
||||
this.setState({ authId: authId });
|
||||
|
||||
Reference in new issue
Block a user