content: import React from 'react';
  import { withRouter } from 'react-router-dom';
  
  const Tabs = props => {
    const handleClick = e => {
      props.history.push('/' + e.target.name);
    }
  
    const pathname = props.location.pathname;
    return (
      <div className="tabs">
        <button
          name="web" onClick={handleClick}
          className={pathname === '/' || pathname === '/web' ? 'active' : ''}
        >
          Web
        </button>
  
        <button
          name="images" onClick={handleClick}
          className={pathname === '/images' ? 'active' : ''}
        >
          Images
        </button>
  
        <button
          name="videos" onClick={handleClick}
          className={pathname === '/videos' ? 'active' : ''}
        >
          Videos
        </button>
  
        <button
          name="maps" onClick={handleClick}
          className={pathname === '/maps' ? 'active' : ''}
        >
          Maps
        </button>
      </div>
    );
  }
  
  export default withRouter(Tabs);