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 | |
---|
1 | import { BrowserRouter, Routes, Route } from "react-router-dom";
|
---|
2 | import './App.css';
|
---|
3 | import HomepageComponent from "./components/HomepageComponent"
|
---|
4 | import PhonePageComponent from "./components/PhonePageComponent";
|
---|
5 | import LoginPageComponent from "./components/LoginPageComponent"
|
---|
6 | import RegisterPageComponent from "./components/RegisterPageComponent";
|
---|
7 | import PhoneOfferDetailsComponent from "./components/PhoneOfferDetailsComponent/PhoneOfferDetailsComponent";
|
---|
8 | import { UserProvider } from "./context/UserContext";
|
---|
9 | import UserFavouriteOffersComponent from "./components/UserFavouriteOffersComponent/UserFavouriteOffersComponent";
|
---|
10 | import SuperAdminComponent from "./components/SuperAdminComponent/SuperAdminComponent";
|
---|
11 | import EditOfferComponent from "./components/EditOfferComponent/EditOfferComponent";
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 | function 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 |
|
---|
34 | export default App;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.