Skip to content

Commit

Permalink
use list table in all sub-sections #757
Browse files Browse the repository at this point in the history
  • Loading branch information
Aprillion committed Aug 24, 2024
1 parent db49adc commit b94d9a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/components/Article/KeepGoing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion app/components/Article/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ type ArticleProps = {
}
export const Article = ({question, glossary, className}: ArticleProps) => {
const {title, text, pageid} = question
console.debug('gg')

return (
<article className={`${className} ${isLoading(question) ? 'loading' : ''}`}>
Expand Down

0 comments on commit b94d9a4

Please sign in to comment.