import React from 'react';
import { Switch, Route } from 'react-router-dom';
import PrivateRoute from './PrivateRoute';
import Home from '../pages/home/home';
import histList from '../pages/histList/histList';
import ProjectDetail from '../pages/projectDetail/projectDetail';

const Routes = ({ userProfileRef }) => (
  <Switch>
    <Route exact path="/">
      <Home />
    </Route>
    <Route path="/project/:projectId">
      <ProjectDetail />
    </Route>
    <PrivateRoute path="/home" component={Home} />
    <PrivateRoute path="/histList" component={histList} />
  </Switch>
);

export default Routes;
