From b94d9a4d4470ad3e624ee0d1cd1f8afa642c30fc Mon Sep 17 00:00:00 2001 From: Peter Hozak Date: Sat, 24 Aug 2024 09:04:04 +0200 Subject: [PATCH] use list table in all sub-sections #757 --- app/components/Article/KeepGoing/index.tsx | 7 ++----- app/components/Article/index.tsx | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/components/Article/KeepGoing/index.tsx b/app/components/Article/KeepGoing/index.tsx index e7d2e80f..c8a712bd 100644 --- a/app/components/Article/KeepGoing/index.tsx +++ b/app/components/Article/KeepGoing/index.tsx @@ -44,11 +44,8 @@ export const KeepGoing = ({pageid, relatedQuestions}: Question) => { const next = getNext(pageid, section?.pageid) const hasRelated = relatedQuestions && relatedQuestions.length > 0 const showListTable = - // used on section and sub-sections, but not on leaf articles - sectionsWithListTable.includes(pageid) || - (section && - sectionsWithListTable.includes(section.pageid) && - section.children?.some((c) => c.pageid == pageid)) + // used on sectionsWithListTable and on sub-sections from any section, but not on leaf articles + sectionsWithListTable.includes(pageid) || section?.children?.some((c) => c.pageid == pageid) const formatRelated = (hasIcon: boolean) => (related: RelatedQuestion) => { const relatedSection = findSection(related.pageid) diff --git a/app/components/Article/index.tsx b/app/components/Article/index.tsx index 8cea290a..9da76bf9 100644 --- a/app/components/Article/index.tsx +++ b/app/components/Article/index.tsx @@ -149,7 +149,6 @@ type ArticleProps = { } export const Article = ({question, glossary, className}: ArticleProps) => { const {title, text, pageid} = question - console.debug('gg') return (