From 60ede64c19696d829faa3caae9ddb81bbc19cb38 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 14 Oct 2018 09:56:13 +0200 Subject: [PATCH] Logged In section only accesible when logged in --- client/src/components/LoggedInUser.js | 6 +----- client/src/components/NavBar.js | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/client/src/components/LoggedInUser.js b/client/src/components/LoggedInUser.js index 5299272da..cfed1d183 100644 --- a/client/src/components/LoggedInUser.js +++ b/client/src/components/LoggedInUser.js @@ -2,7 +2,6 @@ import React, { Component } from 'react' import {graphql} from 'react-apollo' import {getUserByAuthIdQuery} from '../queries/queries' -import LoggedInUserMenu from './LoggedInUserMenu' import Button from '@material-ui/core/Button' import IconButton from '@material-ui/core/IconButton' @@ -53,9 +52,7 @@ class LoggedInUser extends Component { ) } else { return ( -
- -
+
) } } @@ -65,7 +62,6 @@ class LoggedInUser extends Component { } render () { - console.log('props', this.props) if (this.loggedInUserStored !== true) { let user = this.props.data.users_UserByAuthId diff --git a/client/src/components/NavBar.js b/client/src/components/NavBar.js index 85c82c79e..dd090a642 100644 --- a/client/src/components/NavBar.js +++ b/client/src/components/NavBar.js @@ -7,7 +7,7 @@ import Typography from '@material-ui/core/Typography' import IconButton from '@material-ui/core/IconButton' // icons -import HomeIcon from '@material-ui/icons/Home' +import UsersIcon from '@material-ui/icons/People' import BrowseIcon from '@material-ui/icons/ImportContacts' import SearchIcon from '@material-ui/icons/Search' import ContactIcon from '@material-ui/icons/ContactMail' @@ -54,9 +54,6 @@ class NavBar extends Component { componentDidMount () { let user = localStorage.getItem('user') - - console.log('componentDidMount user', user) - let authId if (user !== null && user !== undefined && user !== 'undefined') { @@ -64,8 +61,6 @@ class NavBar extends Component { authId = user.authId } - console.log('componentDidMount authId', authId) - if (authId !== null && authId !== undefined && authId !== 'undefined') { this.setState({ authId: authId }) } @@ -81,7 +76,7 @@ class NavBar extends Component { color='inherit' title='Home' component={HomeLink}> - +