Update App.tsx

This commit is contained in:
Egor
2026-01-17 04:37:28 +03:00
committed by GitHub
parent 905e997cee
commit f7aac853d9

View File

@@ -26,6 +26,7 @@ import AdminServers from './pages/AdminServers'
import AdminPanel from './pages/AdminPanel' import AdminPanel from './pages/AdminPanel'
import AdminDashboard from './pages/AdminDashboard' import AdminDashboard from './pages/AdminDashboard'
import AdminBroadcasts from './pages/AdminBroadcasts' import AdminBroadcasts from './pages/AdminBroadcasts'
import AdminPromocodes from './pages/AdminPromocodes'
function ProtectedRoute({ children }: { children: React.ReactNode }) { function ProtectedRoute({ children }: { children: React.ReactNode }) {
const { isAuthenticated, isLoading } = useAuthStore() const { isAuthenticated, isLoading } = useAuthStore()
@@ -226,6 +227,14 @@ function App() {
</AdminRoute> </AdminRoute>
} }
/> />
<Route
path="/admin/promocodes"
element={
<AdminRoute>
<AdminPromocodes />
</AdminRoute>
}
/>
{/* Catch all */} {/* Catch all */}
<Route path="*" element={<Navigate to="/" replace />} /> <Route path="*" element={<Navigate to="/" replace />} />