perf : cache
This commit is contained in:
@@ -10,9 +10,9 @@ import { AdminHeader } from "@/components/admin/admin-header";
|
||||
import { EditorPresence } from "@/components/admin/editor-presence";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { getAdminSession } from "@/lib/auth/server";
|
||||
import { getCachedCatalogOptions } from "@/lib/cache/catalog";
|
||||
import { toTeamDraft } from "@/lib/guides/team-draft";
|
||||
import {
|
||||
getCatalogOptions,
|
||||
getAdminGuideContent,
|
||||
getGuideEditorHeader,
|
||||
} from "@/lib/guides/queries";
|
||||
@@ -54,7 +54,7 @@ export default async function StructuredEditorPage({
|
||||
?? guide.sections.find((section) => section.slug === page)?.title
|
||||
?? page;
|
||||
const [catalog, content] = await Promise.all([
|
||||
getCatalogOptions(),
|
||||
getCachedCatalogOptions(),
|
||||
getAdminGuideContent(guide.slug, page),
|
||||
]);
|
||||
if (!catalog || !content) notFound();
|
||||
|
||||
Reference in New Issue
Block a user