feat : update
This commit is contained in:
@@ -49,6 +49,9 @@ export default async function StructuredEditorPage({
|
||||
const editorSection = fixedSection
|
||||
? page as (typeof sections)[number]
|
||||
: "extra" as const;
|
||||
const sectionTitle = extraSection?.title
|
||||
?? guide.sections.find((section) => section.slug === page)?.title
|
||||
?? page;
|
||||
const [catalog, content] = await Promise.all([
|
||||
getActiveCatalog(),
|
||||
getAdminGuideContent(guide.slug),
|
||||
@@ -77,9 +80,9 @@ export default async function StructuredEditorPage({
|
||||
<div className="min-w-0">
|
||||
<p className="text-sm text-muted-foreground">{guide.name}</p>
|
||||
<h1 className="whitespace-nowrap font-heading text-3xl font-semibold">
|
||||
{extraSection?.title ?? guide.sections.find((section) => section.slug === page)?.title ?? page}
|
||||
{sectionTitle}
|
||||
</h1>
|
||||
<EditorPresence guideId={guide.id} />
|
||||
<EditorPresence guideId={guide.id} section={sectionTitle} />
|
||||
</div>
|
||||
</header>
|
||||
<GuideSectionNav
|
||||
|
||||
@@ -47,7 +47,7 @@ export default async function GuideOverviewPage({ params }: { params: Promise<{
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-sm text-muted-foreground">เลือกส่วนที่ต้องการแก้ไข</p>
|
||||
<h1 className="font-heading text-3xl font-semibold">{guide.name}</h1>
|
||||
<EditorPresence guideId={guide.id} />
|
||||
<EditorPresence guideId={guide.id} section="Overview" />
|
||||
</div>
|
||||
<GuideVisibilityControl guideId={guide.id} guideName={guide.name} isPublic={guide.isPublic} />
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user