{"size": 590, "ext": "js", "max_stars_repo_path": "src/Navbar.js", "max_stars_repo_name": "SunLee128/Food-Search", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Navbar.js", "max_issues_repo_name": "SunLee128/Food-Search", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Navbar.js", "max_forks_repo_name": "SunLee128/Food-Search", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.6923076923, "max_line_length": 68, "alphanum_fraction": 0.6338983051}
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import './Navbar.css';

class Navbar extends Component {
  constructor (props) {
    super(props);
    this.handleLogin = this.handleLogin.bind(this);
  }

  handleLogin () {
    alert('LOGGED YOU IN!');
    this.props.history.push('/food/salmon');
  }

  render () {
    return (
      <div className='Navbar'>
        <button onClick={this.handleLogin}>Log In</button>
        <button onClick={this.props.history.goBack}>go back</button>
      </div>
    );
  }
}
export default withRouter(Navbar);
