updates
This commit is contained in:
@@ -11,11 +11,14 @@ import { GlobalLoadingProvider } from './contexts/GlobalLoadingContext';
|
||||
import { CookieConsentProvider } from './contexts/CookieConsentContext';
|
||||
import { CurrencyProvider } from './contexts/CurrencyContext';
|
||||
import { CompanySettingsProvider } from './contexts/CompanySettingsContext';
|
||||
import { AuthModalProvider } from './contexts/AuthModalContext';
|
||||
import OfflineIndicator from './components/common/OfflineIndicator';
|
||||
import CookieConsentBanner from './components/common/CookieConsentBanner';
|
||||
import AnalyticsLoader from './components/common/AnalyticsLoader';
|
||||
import Loading from './components/common/Loading';
|
||||
import ScrollToTop from './components/common/ScrollToTop';
|
||||
import AuthModalManager from './components/modals/AuthModalManager';
|
||||
import ResetPasswordRouteHandler from './components/ResetPasswordRouteHandler';
|
||||
|
||||
import useAuthStore from './store/useAuthStore';
|
||||
import useFavoritesStore from './store/useFavoritesStore';
|
||||
@@ -50,10 +53,6 @@ const InvoicePage = lazy(() => import('./pages/customer/InvoicePage'));
|
||||
const ProfilePage = lazy(() => import('./pages/customer/ProfilePage'));
|
||||
const AboutPage = lazy(() => import('./pages/AboutPage'));
|
||||
const ContactPage = lazy(() => import('./pages/ContactPage'));
|
||||
const LoginPage = lazy(() => import('./pages/auth/LoginPage'));
|
||||
const RegisterPage = lazy(() => import('./pages/auth/RegisterPage'));
|
||||
const ForgotPasswordPage = lazy(() => import('./pages/auth/ForgotPasswordPage'));
|
||||
const ResetPasswordPage = lazy(() => import('./pages/auth/ResetPasswordPage'));
|
||||
|
||||
const AdminDashboardPage = lazy(() => import('./pages/admin/DashboardPage'));
|
||||
const InvoiceManagementPage = lazy(() => import('./pages/admin/InvoiceManagementPage'));
|
||||
@@ -69,17 +68,7 @@ const ReceptionDashboardPage = lazy(() => import('./pages/admin/ReceptionDashboa
|
||||
const StaffDashboardPage = lazy(() => import('./pages/staff/DashboardPage'));
|
||||
const ChatManagementPage = lazy(() => import('./pages/staff/ChatManagementPage'));
|
||||
const StaffLayout = lazy(() => import('./pages/StaffLayout'));
|
||||
|
||||
const DemoPage: React.FC<{ title: string }> = ({ title }) => (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<h1 className="text-3xl font-bold text-gray-800">
|
||||
{title}
|
||||
</h1>
|
||||
<p className="text-gray-600 mt-4">
|
||||
This page is under development...
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
const NotFoundPage = lazy(() => import('./pages/NotFoundPage'));
|
||||
|
||||
function App() {
|
||||
|
||||
@@ -129,6 +118,7 @@ function App() {
|
||||
<CookieConsentProvider>
|
||||
<CurrencyProvider>
|
||||
<CompanySettingsProvider>
|
||||
<AuthModalProvider>
|
||||
<BrowserRouter
|
||||
future={{
|
||||
v7_startTransition: true,
|
||||
@@ -275,21 +265,9 @@ function App() {
|
||||
</Route>
|
||||
|
||||
{}
|
||||
<Route
|
||||
path="/login"
|
||||
element={<LoginPage />}
|
||||
/>
|
||||
<Route
|
||||
path="/register"
|
||||
element={<RegisterPage />}
|
||||
/>
|
||||
<Route
|
||||
path="/forgot-password"
|
||||
element={<ForgotPasswordPage />}
|
||||
/>
|
||||
<Route
|
||||
path="/reset-password/:token"
|
||||
element={<ResetPasswordPage />}
|
||||
element={<ResetPasswordRouteHandler />}
|
||||
/>
|
||||
|
||||
{}
|
||||
@@ -383,7 +361,7 @@ function App() {
|
||||
{}
|
||||
<Route
|
||||
path="*"
|
||||
element={<DemoPage title="404 - Page not found" />}
|
||||
element={<NotFoundPage />}
|
||||
/>
|
||||
</Routes>
|
||||
|
||||
@@ -404,8 +382,10 @@ function App() {
|
||||
<OfflineIndicator />
|
||||
<CookieConsentBanner />
|
||||
<AnalyticsLoader />
|
||||
<AuthModalManager />
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
</AuthModalProvider>
|
||||
</CompanySettingsProvider>
|
||||
</CurrencyProvider>
|
||||
</CookieConsentProvider>
|
||||
|
||||
Reference in New Issue
Block a user