From 594d76690ddd67b83390a05c2f20f7d389adf81e Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:49:02 -0400 Subject: [PATCH] Respect hideTableOfContents --- .../docusaurus-theme-openapi/src/theme/ApiItem/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/docusaurus-theme-openapi/src/theme/ApiItem/index.tsx b/packages/docusaurus-theme-openapi/src/theme/ApiItem/index.tsx index 879ac1b2e..15aa6c93f 100644 --- a/packages/docusaurus-theme-openapi/src/theme/ApiItem/index.tsx +++ b/packages/docusaurus-theme-openapi/src/theme/ApiItem/index.tsx @@ -52,7 +52,6 @@ function ApiItem(props: typeof Props): JSX.Element { next, showExecuteButton, showManualAuthentication, - type, } = metadata; // We only add a title if: @@ -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");