perf : increase admin page speed

This commit is contained in:
2026-10-01 13:03:38 +07:00 Unverified
parent 9c91561abe
commit c5037154cb
7 changed files with 164 additions and 24 deletions
+4 -6
View File
@@ -11,7 +11,7 @@ import { EditorPresence } from "@/components/admin/editor-presence";
import { Button } from "@/components/ui/button";
import { getAdminSession } from "@/lib/auth/server";
import {
getActiveCatalog,
getCatalogOptions,
getAdminGuideContent,
getGuideEditorHeader,
} from "@/lib/guides/queries";
@@ -53,13 +53,11 @@ export default async function StructuredEditorPage({
?? guide.sections.find((section) => section.slug === page)?.title
?? page;
const [catalog, content] = await Promise.all([
getActiveCatalog(),
getAdminGuideContent(guide.slug),
getCatalogOptions(),
getAdminGuideContent(guide.slug, page),
]);
if (!catalog || !content) notFound();
const guideCharacter = catalog.characters.find(
(item) => item.key === guide.characterKey,
);
const guideCharacter = content.character;
return (
<div className="min-h-svh">
<AdminHeader />