Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use list table in all sub-sections #759

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading