Skip to content

Commit

Permalink
Respect hideTableOfContents
Browse files Browse the repository at this point in the history
  • Loading branch information
sserrata committed Apr 13, 2022
1 parent 340d83f commit 594d766
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function ApiItem(props: typeof Props): JSX.Element {
next,
showExecuteButton,
showManualAuthentication,
type,
} = metadata;

// We only add a title if:
Expand All @@ -64,10 +63,7 @@ function ApiItem(props: typeof Props): JSX.Element {
const windowSize = useWindowSize();

const canRenderTOC =
!hideTableOfContents &&
ApiContent.toc &&
ApiContent.toc.length > 0 &&
type !== "api";
!hideTableOfContents && ApiContent.toc && ApiContent.toc.length > 0;

const renderTocDesktop =
canRenderTOC && (windowSize === "desktop" || windowSize === "ssr");
Expand Down

0 comments on commit 594d766

Please sign in to comment.