diff -r 3c9d3c8f41d1 -r 3b20e2b584fe client/src/components/Navbar.js
--- a/client/src/components/Navbar.js Thu Jun 15 17:18:22 2017 +0200
+++ b/client/src/components/Navbar.js Fri Jun 16 18:36:39 2017 +0200
@@ -22,6 +22,13 @@
}
renderLogin() {
+
+ if (this.props.currentUser) {
+ return (
+ { this.props.currentUser.username }
+ );
+ }
+
return (
Login
);
@@ -55,7 +62,8 @@
function mapStateToProps(state, props) {
return {
- isAuthenticated: state.get('isAuthenticated')
+ isAuthenticated: state.get('isAuthenticated'),
+ currentUser: state.get('currentUser'),
};
}