source: frontend/src/App.js@ 0f5aa27

Last change on this file since 0f5aa27 was 0f5aa27, checked in by darsov2 <62809499+darsov2@…>, 9 months ago

ouath, mailing impl

  • Property mode set to 100644
File size: 5.0 KB
Line 
1import logo from './logo.svg';
2import './App.css';
3import Navigation from './Components/Layout/Navbar/Navigation';
4import 'bootstrap/dist/css/bootstrap.css';
5import 'bootstrap/dist/js/bootstrap.js';
6import HomeCarousel from './Components/Layout/CarouselHome/Carousel';
7import {Card, Container} from 'react-bootstrap';
8import TabComponent from './Components/Tab/Tab';
9import Offers from './Components/Layout/Offers/Offers';
10import MostVisitedBar from './Components/MostVisited/MostVisitedBar';
11import Review from './Components/BecomeAHost/Review';
12import MostPopularRoutesCont from './Components/MostPopularRoutes/MostPopularRoutesCont';
13import BecomeAHost from "./Components/BecomeAHost/BecomeAHost"
14import HomePage from './Pages/HomePage';
15import LoginPage from './Pages/LoginPage';
16import RegistrationPage from './Pages/RegistrationPage'
17import SearchPage from './Pages/SearchPage';
18import HotelDetailsPage from './Pages/HotelDetailsPage';
19import ProfilePage from './Pages/ProfilePage';
20import ResourcesPage from './Pages/ResourcesPage';
21import LoginForm from './Components/Login/LoginForm';
22import StaticExample from './Components/Modal';
23import TransportDetailsPage from './Pages/TransportDetailsPage';
24import NoBusinessRegisteredError from './Pages/NoBusinessRegisteredError';
25import HotelEditPage from './Pages/HotelEditPage';
26import RestaurantEditPage from './Pages/RestaurantEditPage';
27import TransportEditPage from './Pages/TransportEditPage';
28import RestaurantDetailsPage from './Pages/RestaurantDetailsPage';
29import {BrowserRouter, Route, Routes} from 'react-router-dom';
30import LoginErrorPage from "./Pages/LoginErrorPage";
31import {AuthProvider} from "./Components/Context/AuthContext";
32import PrivateRoute from "./Components/Misc/PrivateRoute";
33import ProfilesManagementPage from "./Pages/ProfilesManagementPage";
34import UserReservationsManagement from "./Pages/UserReservationsManagement";
35import LoginCallback from "./Components/LoginCallback";
36import ConnectedAccountsPage from "./Pages/ConnectedAccountsPage";
37
38
39function App() {
40
41 return (
42 <div className="App" style={{overflow: 'hidden'}}>
43 <AuthProvider>
44 <BrowserRouter>
45 <Routes>
46 <Route path='/login' element={<LoginPage/>}/>
47 <Route path='/register' element={<RegistrationPage/>}/>
48 <Route path='/profile' element={<PrivateRoute><ProfilePage/></PrivateRoute>}/>
49 <Route path='/profiles' element={<PrivateRoute><ProfilesManagementPage/></PrivateRoute>}/>
50 <Route path='/reservations' element={<PrivateRoute><UserReservationsManagement/></PrivateRoute>}/>
51 <Route path="/resources" exact element={<PrivateRoute><NoBusinessRegisteredError
52 hasRegistration="false"/></PrivateRoute>}/>
53 <Route path="/resources/hotel"
54 element={<PrivateRoute><ResourcesPage tab="/hotel"/></PrivateRoute>}/>
55 <Route path="/resources/hotel/:hotelId" element={<PrivateRoute><HotelEditPage/></PrivateRoute>}/>
56 <Route path="/resources/restaurant"
57 element={<PrivateRoute><ResourcesPage tab="/restaurant"/></PrivateRoute>}/>
58 <Route path='/resources/restaurant/:restaurantId'
59 element={<PrivateRoute><RestaurantEditPage/></PrivateRoute>}/>
60 <Route path="/resources/transport"
61 element={<PrivateRoute><ResourcesPage tab="/transport"/></PrivateRoute>}/>
62 <Route path="/resources/transport/:transportId"
63 element={<PrivateRoute><TransportEditPage/></PrivateRoute>}/>
64 <Route path="/home" element={<HomePage/>}/>
65 <Route path="/error" element={<LoginErrorPage/>}/>
66 <Route path='/details/transport' element={<TransportDetailsPage></TransportDetailsPage>}/>
67 <Route path='/details/hotel' element={<HotelDetailsPage></HotelDetailsPage>}/>
68 <Route path='/details/restaurant' element={<RestaurantDetailsPage></RestaurantDetailsPage>}/>
69 <Route path="/search/hotel/:hotelLocation/:dateFrom/:dateTo/:numBeds/:flexible"
70 element={<SearchPage type="hotel"/>}/>
71 <Route path="/search/transport/:from/:to/:date/:numPassengers"
72 element={<SearchPage type="transport"/>}/>
73 <Route path="/search/restaurant/:restaurantLocation/:date/:hourFrom/:hourTo/:numPeople"
74 element={<SearchPage type="restaurant"/>}/>
75 <Route path="/login-callback" element={<LoginCallback/>}></Route>
76 <Route path="/connected" element={<PrivateRoute><ConnectedAccountsPage/></PrivateRoute>}></Route>
77 </Routes>
78 </BrowserRouter>
79 </AuthProvider>
80 </div>
81 );
82}
83
84export default App;
Note: See TracBrowser for help on using the repository browser.