Add reports management to Sidebar and API index; introduce new route for reports with appropriate guard

This commit is contained in:
lafay
2026-03-29 20:13:32 +08:00
parent c71e6c6587
commit e7c9ee5159
5 changed files with 694 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ const Posts = lazy(() => import('@/pages/Posts'))
const Comments = lazy(() => import('@/pages/Comments'))
const Groups = lazy(() => import('@/pages/Groups'))
const Channels = lazy(() => import('@/pages/Channels'))
const Reports = lazy(() => import('@/pages/Reports'))
const MaterialSubjects = lazy(() => import('@/pages/MaterialSubjects'))
const Materials = lazy(() => import('@/pages/Materials'))
const Forbidden = lazy(() => import('@/pages/Forbidden'))
@@ -194,6 +195,16 @@ export const router = createBrowserRouter([
</ModeratorGuard>
),
},
{
path: 'reports',
element: (
<ModeratorGuard>
<Suspense fallback={<PageLoader />}>
<Reports />
</Suspense>
</ModeratorGuard>
),
},
{
path: 'channels',
element: (