import { Routes, Route } from 'react-router-dom';
// import './App.css';

import LoginPage from './views/LoginPage';
import siteLinks from './links/siteLinks';
import HomePage from './views/HomePage';
import SignupPage from './views/SignupPage';
import ForgetpwdPage from './views/ForgetpwdPage';
import UserExist from './component/authorization/UserExist';



function App() {
  return (
    <div className="">
      <Routes>
        <Route path={siteLinks.home} element={<LoginPage />} />
        <Route path={siteLinks.login} element={<LoginPage />} />
        <Route path={siteLinks.signup} element={<SignupPage />} />
        <Route path={siteLinks.forgetpwd} element={<ForgetpwdPage />} />
        <Route path={siteLinks.error} element={<ForgetpwdPage />} />

        {/* protected routes */}
        <Route element={<UserExist />}> 
          <Route path={siteLinks.dash} element={<HomePage />} />
        </Route>
      </Routes>
    </div>
  );
}

export default App;
