diff --git a/src/components/Guide/GuideContent.tsx b/src/components/Guide/GuideContent.tsx index f119a177f..c848cd7b4 100644 --- a/src/components/Guide/GuideContent.tsx +++ b/src/components/Guide/GuideContent.tsx @@ -38,7 +38,7 @@ export function GuideContent(props: GuideContentProps) {

{guide.title}

-

+

{node.content ? this.content(node) : <> }

; + const isEmpty = + !node.content || + node.content?.every( + (child) => child.type === 'text' && child.text === '', + ); + + if (isEmpty) { + return <>; + } + + return

{this.content(node)}

; } private text(node: JSONContent): JSX.Element { diff --git a/src/queries/official-guide.ts b/src/queries/official-guide.ts index 03d8054f0..4e4892a18 100644 --- a/src/queries/official-guide.ts +++ b/src/queries/official-guide.ts @@ -21,6 +21,10 @@ export interface OfficialGuideDocument { keywords?: string[]; }; tags?: string[]; + + questionCount?: number; + questionTopicCount?: number; + viewCount?: number; createdAt: Date; updatedAt: Date;