refactor(risk, navigation): update risk management redirects and enhance loading states
Changed default redirects in risk management pages to point to the new risk pools section. Removed unused risk lock log components and streamlined the admin reports page with a loading state for better user experience. Added a new DocFigure component for improved documentation visuals and updated localization files to include new figure descriptions.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { RiskLockLogsConsole } from "@/modules/risk/risk-lock-logs-console";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function AdminDrawRiskOccupancyPage(props: {
|
||||
export default async function AdminDrawRiskOccupancyRedirectPage(props: {
|
||||
params: Promise<{ drawId: string }>;
|
||||
}) {
|
||||
const { drawId } = await props.params;
|
||||
const id = Number(drawId);
|
||||
|
||||
return <RiskLockLogsConsole drawId={id} />;
|
||||
redirect(`/admin/draws/${drawId}/risk/pools`);
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ export default async function AdminDrawRiskIndexPage(props: {
|
||||
}) {
|
||||
const { drawId } = await props.params;
|
||||
|
||||
redirect(`/admin/draws/${drawId}/risk/occupancy`);
|
||||
redirect(`/admin/draws/${drawId}/risk/pools`);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
|
||||
import { AdminLoadingState } from "@/components/admin/admin-loading-state";
|
||||
import { PRD_REPORTS_VIEW_ACCESS_ANY } from "@/lib/admin-prd";
|
||||
import { ReportsConsole } from "@/modules/reports/reports-console";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export default function AdminReportsPage() {
|
||||
return (
|
||||
<AdminPermissionGate requiredAny={PRD_REPORTS_VIEW_ACCESS_ANY}>
|
||||
<ReportsConsole />
|
||||
<Suspense fallback={<AdminLoadingState minHeight="12rem" />}>
|
||||
<ReportsConsole />
|
||||
</Suspense>
|
||||
</AdminPermissionGate>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ export default async function AdminRiskOccupancyPage(props: {
|
||||
params: Promise<{ drawId: string }>;
|
||||
}) {
|
||||
const { drawId } = await props.params;
|
||||
redirect(`/admin/draws/${drawId}/risk/occupancy`);
|
||||
redirect(`/admin/draws/${drawId}/risk/pools`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user