From e78ef36d9e4e803e5ad1973895f3ea127cd37820 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Mon, 18 Aug 2025 19:41:01 +0600 Subject: [PATCH] wip --- src/components/Guide/GuideContent.tsx | 2 +- src/lib/guide-renderer.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Guide/GuideContent.tsx b/src/components/Guide/GuideContent.tsx index c848cd7b4..9d81e6008 100644 --- a/src/components/Guide/GuideContent.tsx +++ b/src/components/Guide/GuideContent.tsx @@ -34,7 +34,7 @@ export function GuideContent(props: GuideContentProps) { showTableOfContent && 'lg:border-r', )} > -
+

{guide.title}

diff --git a/src/lib/guide-renderer.tsx b/src/lib/guide-renderer.tsx index 02c63b756..ac60f8768 100644 --- a/src/lib/guide-renderer.tsx +++ b/src/lib/guide-renderer.tsx @@ -129,8 +129,10 @@ export class GuideRenderer { const nodes = node.content || []; const headlines: Array = []; + let hasFoundQASection = false; const extractHeadlines = (node: JSONContent) => { - if (node.type === 'qaSection') { + if (node.type === 'qaSection' || hasFoundQASection) { + hasFoundQASection = true; return; } @@ -231,7 +233,6 @@ export class GuideRenderer { node.content?.every( (child) => child.type === 'text' && child.text === '', ); - if (isEmpty) { return <>; } @@ -368,7 +369,7 @@ export class GuideRenderer { return
{this.content(node)}
; } - private questions(node: JSONContent) { + questions(node: JSONContent) { const content = node.content || []; const questions: QuestionType[] = []; let currentTopic: string | null = null;