import { React, Component } from 'react'; import { Navbar, NavbarBrand } from 'reactstrap'; import { Link } from 'react-router-dom'; import './Navigation.css'; const menuItems = [ 'Home', 'About', ]; class Navigation extends Component { constructor(props) { super(props); // Yeah I know you might not hit home.. but I can't get the // path based finder thing working on initial load :sweatsmile: console.log(this.props.initLocation) this.state = { isLoggedIn: false, active: "Home" }; } toggleLogin() { this.setState({ isLoggedIn: !this.state.isLoggedIn }) } _handleClick(menuItem) { this.setState({ active: menuItem }); } render() { const activeStyle = { color: '#FFFFFF' }; const renderAuthButton = () => { if (this.state.isLoggedIn) { return Logout; } else { return
LoginRegister
; } } return (
GoScrobble {menuItems.map(menuItem => {menuItem} )} {renderAuthButton()}
); } } export default Navigation;