1 | import logo from './logo.svg';
|
---|
2 | import './App.css';
|
---|
3 | import Navigation from './Components/Layout/Navbar/Navigation';
|
---|
4 | import 'bootstrap/dist/css/bootstrap.css';
|
---|
5 | import 'bootstrap/dist/js/bootstrap.js';
|
---|
6 | import HomeCarousel from './Components/Layout/CarouselHome/Carousel';
|
---|
7 | import {Card, Container} from 'react-bootstrap';
|
---|
8 | import TabComponent from './Components/Tab/Tab';
|
---|
9 | import Offers from './Components/Layout/Offers/Offers';
|
---|
10 | import MostVisitedBar from './Components/MostVisited/MostVisitedBar';
|
---|
11 | import Review from './Components/BecomeAHost/Review';
|
---|
12 | import MostPopularRoutesCont from './Components/MostPopularRoutes/MostPopularRoutesCont';
|
---|
13 | import BecomeAHost from "./Components/BecomeAHost/BecomeAHost"
|
---|
14 | import HomePage from './Pages/HomePage';
|
---|
15 | import LoginPage from './Pages/LoginPage';
|
---|
16 | import RegistrationPage from './Pages/RegistrationPage'
|
---|
17 | import SearchPage from './Pages/SearchPage';
|
---|
18 | import HotelDetailsPage from './Pages/HotelDetailsPage';
|
---|
19 | import ProfilePage from './Pages/ProfilePage';
|
---|
20 | import ResourcesPage from './Pages/ResourcesPage';
|
---|
21 | import LoginForm from './Components/Login/LoginForm';
|
---|
22 | import StaticExample from './Components/Modal';
|
---|
23 | import TransportDetailsPage from './Pages/TransportDetailsPage';
|
---|
24 | import NoBusinessRegisteredError from './Pages/NoBusinessRegisteredError';
|
---|
25 | import HotelEditPage from './Pages/HotelEditPage';
|
---|
26 | import RestaurantEditPage from './Pages/RestaurantEditPage';
|
---|
27 | import TransportEditPage from './Pages/TransportEditPage';
|
---|
28 | import RestaurantDetailsPage from './Pages/RestaurantDetailsPage';
|
---|
29 | import {BrowserRouter, Route, Routes} from 'react-router-dom';
|
---|
30 | import LoginErrorPage from "./Pages/LoginErrorPage";
|
---|
31 | import {AuthProvider} from "./Components/Context/AuthContext";
|
---|
32 | import PrivateRoute from "./Components/Misc/PrivateRoute";
|
---|
33 | import ProfilesManagementPage from "./Pages/ProfilesManagementPage";
|
---|
34 | import UserReservationsManagement from "./Pages/UserReservationsManagement";
|
---|
35 | import LoginCallback from "./Components/LoginCallback";
|
---|
36 | import ConnectedAccountsPage from "./Pages/ConnectedAccountsPage";
|
---|
37 |
|
---|
38 |
|
---|
39 | function 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 |
|
---|
84 | export default App;
|
---|