Files
house-marketplace/src/App.js
T
2022-12-04 16:36:39 +02:00

49 lines
1.7 KiB
JavaScript

import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import PrivateRoute from "./components/PrivateRoute";
import Navbar from "./components/Navbar";
import Explore from "./pages/Explore";
import Profile from "./pages/Profile";
import ForgotPassword from "./pages/ForgotPassword";
import Offers from "./pages/Offers";
import Signin from "./pages/Signin";
import Signup from "./pages/Signup";
import Category from "./pages/Category";
import CreateLising from "./pages/CreateListing";
import Listing from "./pages/Listing";
import Contact from "./pages/Contact";
import EditListing from "./pages/EditListing";
function App() {
return (
<>
<Router>
<Routes>
<Route path="/" element={<Explore />} />
<Route path="/offers" element={<Offers />} />
<Route path="/category/:categoryName" element={<Category />} />
<Route path="/profile" element={<PrivateRoute />}>
<Route path="/profile" element={<Profile />} />
</Route>
<Route path="/sign-in" element={<Signin />} />
<Route path="/sign-up" element={<Signup />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/create-listing" element={<CreateLising />} />
<Route path="/edit-listing/:listingId" element={<EditListing />} />
<Route
path="/category/:categoryName/:listingId"
element={<Listing />}
/>
<Route path="/contact/:landlordId" element={<Contact />}/>
</Routes>
<Navbar />
</Router>
<ToastContainer />
</>
);
}
export default App;