mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
Update App.tsx
This commit is contained in:
@@ -44,6 +44,7 @@ const AdminUsers = lazy(() => import('./pages/AdminUsers'))
|
|||||||
const AdminPayments = lazy(() => import('./pages/AdminPayments'))
|
const AdminPayments = lazy(() => import('./pages/AdminPayments'))
|
||||||
const AdminPromoOffers = lazy(() => import('./pages/AdminPromoOffers'))
|
const AdminPromoOffers = lazy(() => import('./pages/AdminPromoOffers'))
|
||||||
const AdminRemnawave = lazy(() => import('./pages/AdminRemnawave'))
|
const AdminRemnawave = lazy(() => import('./pages/AdminRemnawave'))
|
||||||
|
const AdminEmailTemplates = lazy(() => import('./pages/AdminEmailTemplates'))
|
||||||
|
|
||||||
function ProtectedRoute({ children }: { children: React.ReactNode }) {
|
function ProtectedRoute({ children }: { children: React.ReactNode }) {
|
||||||
const { isAuthenticated, isLoading } = useAuthStore()
|
const { isAuthenticated, isLoading } = useAuthStore()
|
||||||
@@ -332,6 +333,14 @@ function App() {
|
|||||||
</AdminRoute>
|
</AdminRoute>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path="/admin/email-templates"
|
||||||
|
element={
|
||||||
|
<AdminRoute>
|
||||||
|
<LazyPage><AdminEmailTemplates /></LazyPage>
|
||||||
|
</AdminRoute>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* Catch all */}
|
{/* Catch all */}
|
||||||
<Route path="*" element={<Navigate to="/" replace />} />
|
<Route path="*" element={<Navigate to="/" replace />} />
|
||||||
|
|||||||
Reference in New Issue
Block a user