Redux installed, reducer added

This commit is contained in:
Luis Fernando Molina committed 2018-09-08 10:06:16 +02:00
1 parent 2fde69f808
commit 3eb9afc83c
7 files changed
+2626 -2641

No files matched your search

+12 -8
View File
@@ -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 (