@@ -1,4 +1,5 @@
11import { useState, useEffect, useRef } from "react";
2+import classNames from "classnames";
23
34export const TableOfContents = ({ staticPosition, noh3s }) => {
45 const { nestedHeadings } = useHeadingsData(noh3s);
@@ -51,7 +52,7 @@ const useHeadingsData = (noh3s) => {
5152};
5253
5354const Headings = ({ headings, activeId }) => (
54− <ul>
55+ <ul className={classNames({ hidden: headings.length === 1 })}>
5556 {headings.map((heading, index) => (
5657 <li key={heading.id}>
5758 <a