diff --git a/app/components/Article/KeepGoing/index.tsx b/app/components/Article/KeepGoing/index.tsx index 54f4bb53..e7d2e80f 100644 --- a/app/components/Article/KeepGoing/index.tsx +++ b/app/components/Article/KeepGoing/index.tsx @@ -8,7 +8,7 @@ import type {Question, RelatedQuestion} from '~/server-utils/stampy' import {questionUrl} from '~/routesMapper' import styles from './keepGoing.module.css' -const nonContinueSections = ['8TJV'] +const sectionsWithListTable = ['8TJV'] type NextArticleProps = { section?: TOCItem @@ -43,7 +43,12 @@ export const KeepGoing = ({pageid, relatedQuestions}: Question) => { const section = findSection(location?.state?.section || pageid) const next = getNext(pageid, section?.pageid) const hasRelated = relatedQuestions && relatedQuestions.length > 0 - const skipNext = nonContinueSections.includes(section?.pageid || '') + 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)) const formatRelated = (hasIcon: boolean) => (related: RelatedQuestion) => { const relatedSection = findSection(related.pageid) @@ -54,25 +59,23 @@ export const KeepGoing = ({pageid, relatedQuestions}: Question) => { return (