updates
This commit is contained in:
@@ -9,6 +9,7 @@ import { ToastContainer } from 'react-toastify';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
import { GlobalLoadingProvider } from './contexts/GlobalLoadingContext';
|
||||
import { CookieConsentProvider } from './contexts/CookieConsentContext';
|
||||
import { CurrencyProvider } from './contexts/CurrencyContext';
|
||||
import OfflineIndicator from './components/common/OfflineIndicator';
|
||||
import CookieConsentBanner from './components/common/CookieConsentBanner';
|
||||
import AnalyticsLoader from './components/common/AnalyticsLoader';
|
||||
@@ -40,8 +41,10 @@ const BookingPage = lazy(() => import('./pages/customer/BookingPage'));
|
||||
const BookingSuccessPage = lazy(() => import('./pages/customer/BookingSuccessPage'));
|
||||
const BookingDetailPage = lazy(() => import('./pages/customer/BookingDetailPage'));
|
||||
const DepositPaymentPage = lazy(() => import('./pages/customer/DepositPaymentPage'));
|
||||
const FullPaymentPage = lazy(() => import('./pages/customer/FullPaymentPage'));
|
||||
const PaymentConfirmationPage = lazy(() => import('./pages/customer/PaymentConfirmationPage'));
|
||||
const PaymentResultPage = lazy(() => import('./pages/customer/PaymentResultPage'));
|
||||
const InvoicePage = lazy(() => import('./pages/customer/InvoicePage'));
|
||||
const ProfilePage = lazy(() => import('./pages/customer/ProfilePage'));
|
||||
const AboutPage = lazy(() => import('./pages/AboutPage'));
|
||||
const LoginPage = lazy(() => import('./pages/auth/LoginPage'));
|
||||
@@ -55,12 +58,15 @@ const RoomManagementPage = lazy(() => import('./pages/admin/RoomManagementPage')
|
||||
const UserManagementPage = lazy(() => import('./pages/admin/UserManagementPage'));
|
||||
const BookingManagementPage = lazy(() => import('./pages/admin/BookingManagementPage'));
|
||||
const PaymentManagementPage = lazy(() => import('./pages/admin/PaymentManagementPage'));
|
||||
const InvoiceManagementPage = lazy(() => import('./pages/admin/InvoiceManagementPage'));
|
||||
const ServiceManagementPage = lazy(() => import('./pages/admin/ServiceManagementPage'));
|
||||
const ReviewManagementPage = lazy(() => import('./pages/admin/ReviewManagementPage'));
|
||||
const PromotionManagementPage = lazy(() => import('./pages/admin/PromotionManagementPage'));
|
||||
const BannerManagementPage = lazy(() => import('./pages/admin/BannerManagementPage'));
|
||||
const ReportsPage = lazy(() => import('./pages/admin/ReportsPage'));
|
||||
const CookieSettingsPage = lazy(() => import('./pages/admin/CookieSettingsPage'));
|
||||
const CurrencySettingsPage = lazy(() => import('./pages/admin/CurrencySettingsPage'));
|
||||
const StripeSettingsPage = lazy(() => import('./pages/admin/StripeSettingsPage'));
|
||||
const AuditLogsPage = lazy(() => import('./pages/admin/AuditLogsPage'));
|
||||
const CheckInPage = lazy(() => import('./pages/admin/CheckInPage'));
|
||||
const CheckOutPage = lazy(() => import('./pages/admin/CheckOutPage'));
|
||||
@@ -123,6 +129,7 @@ function App() {
|
||||
return (
|
||||
<GlobalLoadingProvider>
|
||||
<CookieConsentProvider>
|
||||
<CurrencyProvider>
|
||||
<BrowserRouter
|
||||
future={{
|
||||
v7_startTransition: true,
|
||||
@@ -152,7 +159,7 @@ function App() {
|
||||
element={<SearchResultsPage />}
|
||||
/>
|
||||
<Route
|
||||
path="rooms/:id"
|
||||
path="rooms/:room_number"
|
||||
element={<RoomDetailPage />}
|
||||
/>
|
||||
<Route
|
||||
@@ -163,6 +170,14 @@ function App() {
|
||||
path="payment-result"
|
||||
element={<PaymentResultPage />}
|
||||
/>
|
||||
<Route
|
||||
path="invoices/:id"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<InvoicePage />
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="about"
|
||||
element={<AboutPage />}
|
||||
@@ -218,7 +233,15 @@ function App() {
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="payment/:id"
|
||||
path="payment/:bookingId"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<FullPaymentPage />
|
||||
</ProtectedRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="payment-confirmation/:id"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<PaymentConfirmationPage />
|
||||
@@ -283,6 +306,10 @@ function App() {
|
||||
path="payments"
|
||||
element={<PaymentManagementPage />}
|
||||
/>
|
||||
<Route
|
||||
path="invoices"
|
||||
element={<InvoiceManagementPage />}
|
||||
/>
|
||||
<Route
|
||||
path="services"
|
||||
element={<ServiceManagementPage />}
|
||||
@@ -319,6 +346,14 @@ function App() {
|
||||
path="settings"
|
||||
element={<CookieSettingsPage />}
|
||||
/>
|
||||
<Route
|
||||
path="settings/currency"
|
||||
element={<CurrencySettingsPage />}
|
||||
/>
|
||||
<Route
|
||||
path="settings/stripe"
|
||||
element={<StripeSettingsPage />}
|
||||
/>
|
||||
</Route>
|
||||
|
||||
{/* 404 Route */}
|
||||
@@ -347,6 +382,7 @@ function App() {
|
||||
<AnalyticsLoader />
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
</CurrencyProvider>
|
||||
</CookieConsentProvider>
|
||||
</GlobalLoadingProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user