Update App.tsx

This commit is contained in:
Egor
2026-01-26 21:59:56 +03:00
committed by GitHub
parent f10594c4b4
commit 69c12ee5a0

View File

@@ -44,6 +44,7 @@ const AdminUsers = lazy(() => import('./pages/AdminUsers'))
const AdminPayments = lazy(() => import('./pages/AdminPayments'))
const AdminPromoOffers = lazy(() => import('./pages/AdminPromoOffers'))
const AdminRemnawave = lazy(() => import('./pages/AdminRemnawave'))
const AdminEmailTemplates = lazy(() => import('./pages/AdminEmailTemplates'))
function ProtectedRoute({ children }: { children: React.ReactNode }) {
const { isAuthenticated, isLoading } = useAuthStore()
@@ -332,6 +333,14 @@ function App() {
</AdminRoute>
}
/>
<Route
path="/admin/email-templates"
element={
<AdminRoute>
<LazyPage><AdminEmailTemplates /></LazyPage>
</AdminRoute>
}
/>
{/* Catch all */}
<Route path="*" element={<Navigate to="/" replace />} />