source: phonelux-frontend/src/App.js@ 7e88e46

Last change on this file since 7e88e46 was 7e88e46, checked in by Marko <Marko@…>, 2 years ago

Added more components

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import { BrowserRouter, Routes, Route } from "react-router-dom";
2import './App.css';
3import HomepageComponent from "./components/HomepageComponent"
4import PhonePageComponent from "./components/PhonePageComponent";
5import LoginPageComponent from "./components/LoginPageComponent"
6import RegisterPageComponent from "./components/RegisterPageComponent";
7import PhoneOfferDetailsComponent from "./components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent";
8import { UserProvider } from "./context/UserContext";
9import UserFavouriteOffersComponent from "./components/UserFavouriteOffersComponent/UserFavouriteOffersComponent";
10import SuperAdminComponent from "./components/SuperAdminComponent/SuperAdminComponent";
11import EditOfferComponent from "./components/EditOfferComponent/EditOfferComponent";
12
13
14
15function App() {
16 return (
17 <UserProvider>
18 <BrowserRouter>
19 <Routes>
20 <Route path="/" element={<HomepageComponent/>}/>
21 <Route path="/login" element={<LoginPageComponent/>}/>
22 <Route path="/register" element={<RegisterPageComponent/>}/>
23 <Route path="/phones/:phoneId" element={<PhonePageComponent/>} />
24 <Route path="/phoneoffer/:offerId" element={<PhoneOfferDetailsComponent/>} />
25 <Route path="/user/:userId/favouriteoffers" element={<UserFavouriteOffersComponent/>} />
26 <Route path="/management/users" element={<SuperAdminComponent/>}/>
27 <Route path="/admin/editoffer/:offerId" element={<EditOfferComponent/>}/>
28 </Routes>
29 </BrowserRouter>
30 </UserProvider>
31 );
32}
33
34export default App;
Note: See TracBrowser for help on using the repository browser.