2026-08-07 10:44:03 +07:00
|
|
|
/**
|
|
|
|
|
* Moderation page — Server Component. Seeds summary + action log from
|
|
|
|
|
* server-fetched moderation state (shared across all users).
|
|
|
|
|
*/
|
2026-08-05 11:11:10 +07:00
|
|
|
import { ModerationSection } from "@/components/moderation/moderation-section";
|
2026-08-07 10:44:03 +07:00
|
|
|
import { getModerationActions, getModerationStats } from "@/lib/api/server";
|
|
|
|
|
|
|
|
|
|
export default async function ModerationPage() {
|
|
|
|
|
const [stats, actions] = await Promise.allSettled([
|
|
|
|
|
getModerationStats(),
|
|
|
|
|
getModerationActions(100),
|
|
|
|
|
]);
|
2026-08-05 11:11:10 +07:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-4 animate-fade-in-up">
|
2026-08-07 10:44:03 +07:00
|
|
|
<ModerationSection
|
|
|
|
|
initialStats={stats.status === "fulfilled" ? stats.value : undefined}
|
|
|
|
|
initialActions={
|
|
|
|
|
actions.status === "fulfilled" ? actions.value : undefined
|
|
|
|
|
}
|
|
|
|
|
/>
|
2026-08-05 11:11:10 +07:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|