diff --git a/client/src/components/LoggedInUser.js b/client/src/components/LoggedInUser.js index bca26b487..1d9fbad7e 100644 --- a/client/src/components/LoggedInUser.js +++ b/client/src/components/LoggedInUser.js @@ -9,7 +9,7 @@ import IconButton from '@material-ui/core/IconButton' import UserIcon from '@material-ui/icons/Person' import { Link } from 'react-router-dom' -const UserLink = props => +const UserLink = props => class LoggedInUser extends Component { diff --git a/client/src/components/NavBar.js b/client/src/components/NavBar.js index d7bd579dd..643149680 100644 --- a/client/src/components/NavBar.js +++ b/client/src/components/NavBar.js @@ -1,10 +1,11 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' +import classNames from 'classnames' import AppBar from '@material-ui/core/AppBar' import Toolbar from '@material-ui/core/Toolbar' import Typography from '@material-ui/core/Typography' -import IconButton from '@material-ui/core/IconButton' +import Button from '@material-ui/core/Button' // icons import UsersIcon from '@material-ui/icons/People' @@ -18,13 +19,12 @@ import { Link } from 'react-router-dom' // components import LoggedInUser from './LoggedInUser' -const AboutLink = props => -const ContactLink = props => -const SearchLink = props => -const BrowseLink = props => -const HomeLink = props => +const HomeLink = props => +const BrowseLink = props => +const SearchLink = props => +const AboutLink = props => -const styles = { +const styles = theme => ({ root: { flexGrow: 1 }, @@ -35,8 +35,30 @@ const styles = { menuButton: { marginLeft: -12, marginRight: 20 + }, + cssRoot: { + color: '#FFFFFF', + backgroundColor: theme.palette.secondary, + '&:hover': { + backgroundColor: theme.palette.dark + }, + whiteSpace: 'nowrap', + paddingRight: 2 * theme.spacing.unit, + paddingLeft: 2 * theme.spacing.unit + }, + button: { + margin: theme.spacing.unit + }, + leftIcon: { + marginRight: theme.spacing.unit + }, + rightIcon: { + marginLeft: theme.spacing.unit + }, + iconSmall: { + fontSize: 20 } -} +}) class NavBar extends Component { @@ -60,50 +82,57 @@ class NavBar extends Component { this.setState({ authId: authId }) } } + render () { - const { classes } = this.props + const { classes, user, match } = this.props + console.log('NavBar: ', user, match) return (