import React from 'react'; import { Link } from 'react-router-dom'; import SearchBarContainer from '../search_bar_container'; import { withRouter } from 'react-router-dom'; // import SearchBar from '../search/autocomplete'; class NavBarIndex extends React.Component { constructor(props) { super(props); // this.handleClick = this.handleClick.bind(this); } // handleClick() { // this.props.history.push('/bookings') // } render() { let { openModal, updateFilter, filters, currentUser } = this.props; const loggedInButtons = (
{/*
Welcome, {currentUser.username}!
*/}
); const loggedOutButtons = (
); if (this.props.location.pathname === '/') { return null; } else { return (
{/* */}
{this.props.currentUser ? loggedInButtons : loggedOutButtons}
) } } } export default withRouter(NavBarIndex);