Skip to content

Commit

Permalink
fix(section-navigation): hide for fewer than two sections
Browse files Browse the repository at this point in the history
  • Loading branch information
yomatters committed Nov 1, 2024
1 parent 096778b commit 67711a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/section-navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function SectionNavigation({ prompt = "Jump To:" }) {
updateSections();
document.addEventListener("accessci-update-sections", updateSections);
}, []);
return (
return sections.length >= 2 ? (
<nav class="section-navigation">
{prompt ? <h2>{prompt}</h2> : null}
<ul>
Expand All @@ -37,5 +37,5 @@ export default function SectionNavigation({ prompt = "Jump To:" }) {
))}
</ul>
</nav>
);
) : null;
}

0 comments on commit 67711a0

Please sign in to comment.