Skip to content

Commit

Permalink
Merge pull request #759 from StampyAI/list-table-all-subsections
Browse files Browse the repository at this point in the history
use list table in all sub-sections
  • Loading branch information
Aprillion authored Aug 24, 2024
2 parents db49adc + b94d9a4 commit d18f92a
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 d18f92a

Please sign in to comment.