estatesfunding/ef-ui/src/App.jsx

59 lines
1.7 KiB
JavaScript

import { BrowserRouter, Routes, Route } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import Home from "./components/Home";
import About from "./components/About";
import Contact from "./components/Contact";
import Register from "./components/Register";
import Login from "./components/Login";
import Dashboard from "./components/Dashboard";
import PrivateRoute from "./components/PrivateRoute";
import VerifyUser from "./components/EmailVerify";
import ForgotPassword from "./components/ForgotPassword";
import ResetPassword from "./components/ResetPassword";
import Addproperty from "./components/Addproperty";
import Registrationsuccess from "./components/Registrationsuccess";
const App = () => {
return (
<BrowserRouter>
<ToastContainer />
<Routes>
<Route path="/" element={<Home />}></Route>
<Route path="/about" element={<About />}></Route>
<Route path="/contact" element={<Contact/>}></Route>
<Route path="/register" element={<Register/>}></Route>
<Route path="/registrationsuccess" element={<PrivateRoute><Registrationsuccess/></PrivateRoute>}></Route>
<Route path="/login" element={<Login/>}></Route>
<Route
path="/dashboard"
element={
<PrivateRoute>
<Dashboard />
</PrivateRoute>
}
/>
<Route path="/users/:id/verify/:token" element={<VerifyUser />} />
<Route path="/forgotpassword" element={<ForgotPassword />}></Route>
<Route
path="/users/resetpassword/:userId/:token"
element={<ResetPassword />}
/>
<Route path="/addproperty" element={ <PrivateRoute><Addproperty /></PrivateRoute>}></Route>
</Routes>
</BrowserRouter>
)
}
export default App