Redux installed, reducer added
This commit is contained in:
1 parent
2fde69f808
commit
3eb9afc83c
7 files changed
+2626
-2641
No files matched your search
@@ -49,15 +49,19 @@ class NavBar extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const getUser = window.localStorage.getItem("user");
|
||||
let user = JSON.parse(getUser)
|
||||
|
||||
if (user) {
|
||||
const authId = user.sub;
|
||||
this.setState({ authId: authId });
|
||||
}
|
||||
/*
|
||||
this._asyncRequest = window.localStorage.getItem('user').then(
|
||||
response => {
|
||||
this._asyncRequest = null;
|
||||
let user = JSON.parse(response)
|
||||
if (user) {
|
||||
const authId = user.sub;
|
||||
this.setState({ authId: authId });
|
||||
}
|
||||
}
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
render() {
|
||||
const { classes } = this.props;
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user