import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';

import {
  LOGIN_PAGE,
  HOME_PAGE,
  NOT_FOUND_PAGE,
  ERROR_PAGE,
  BASE_PAGE,
} from './constants/pages';
<<<<<<< HEAD

// import LoginPage from './pages/LoginPage/LoginPage';
import LoginPage from './pages/LoginPage/LoginPageMUI';
// import HomePage from './pages/HomePage/HomePage';
import ProfilePage from './pages/ProfilePage/ProfilePage';
=======
import LoginPage from './pages/LoginPage/LoginPage';
import HomePage from './pages/HomePage/HomePageMUI';
>>>>>>> filter-offer-card
import NotFoundPage from './pages/ErrorPages/NotFoundPage';
import ErrorPage from './pages/ErrorPages/ErrorPage';
import PrivateRoute from './components/Router/PrivateRoute';


const AppRoutes = () => {
  return (
  <Switch>
    <Route exact path={BASE_PAGE} component={LoginPage} />
    <Route exact path={LOGIN_PAGE} component={LoginPage} />
    <Route path={NOT_FOUND_PAGE} component={NotFoundPage} />
    <Route path={ERROR_PAGE} component={ErrorPage} />
    
    <PrivateRoute
      exact
      path={HOME_PAGE}
      component={ProfilePage}
    />
    <Redirect from="*" to={NOT_FOUND_PAGE} />
  </Switch>
)};


export default AppRoutes;
