estatesfunding/ef-ui/src/App.jsx

77 lines
2.8 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";
import PropertyView from "./components/PropertyView";
import SearchMysqlProperties from "./components/SearchMysqlProperties";
import Services from "./components/Services";
import PropertyMysqlView from "./components/PropertyMysqlView";
import EditProperty from "./components/EditProperty";
import SearchProperties from "./components/SearchProperties";
import ProfileView from "./components/ProfileView";
const App = () => {
return (
<BrowserRouter>
<ToastContainer />
<Routes>
<Route path="/" element={<Home />}></Route>
<Route path="/about" element={<About />}></Route>
<Route path="/services" element={<Services />}></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> */}
<Route path="/property/:id" element={<PropertyView />} />
<Route path="/properties/:house_id" element={<PropertyMysqlView />} />
<Route path="/searchmyproperties" element={<SearchMysqlProperties />} />
<Route path="/searchproperties" element={<SearchProperties />} />
<Route path="/editproperty/:id" element={<PrivateRoute><EditProperty /></PrivateRoute>} />
<Route path="/profile/:userId" element={<ProfileView />} />
</Routes>
</BrowserRouter>
);
};
export default App;