client/src/components/Navbar.js
changeset 53 d8588379529e
parent 52 96f8a4a59bd9
child 58 f16a080e0bc4
--- a/client/src/components/Navbar.js	Mon Jun 19 15:36:52 2017 +0200
+++ b/client/src/components/Navbar.js	Mon Jun 19 17:56:41 2017 +0200
@@ -1,3 +1,4 @@
+
 import PropTypes from 'prop-types';
 import React, { Component } from 'react';
 import { connect } from 'react-redux';
@@ -23,6 +24,11 @@
     this.props.history.push('/login');
   }
 
+  onClickSettings = (e) => {
+    e.preventDefault();
+    this.props.history.push('/settings');
+  }
+
   onClickLogout = (e) => {
     e.preventDefault();
     this.props.authActions.logout();
@@ -33,7 +39,7 @@
     if (this.props.currentUser) {
       return (
         <NavDropdown title={ this.props.currentUser.username } id="user-dropdown">
-          <MenuItem>Settings</MenuItem>
+          <MenuItem onClick={this.onClickSettings}>Settings</MenuItem>
           <MenuItem onClick={this.onClickLogout}>Logout</MenuItem>
         </NavDropdown>
       );