diff --git a/app/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx index ef87755e99..384eebae24 100644 --- a/app/scenes/Document/components/Document.tsx +++ b/app/scenes/Document/components/Document.tsx @@ -412,7 +412,8 @@ class DocumentScene extends React.Component { (team && team.documentEmbeds === false) || document.embedsDisabled; const showContents = - ui.tocVisible === true || (isShare && ui.tocVisible !== false); + (ui.tocVisible === true && !document.isTemplate) || + (isShare && ui.tocVisible !== false); const tocPos = tocPosition ?? ((team?.getPreference(TeamPreference.TocPosition) as TOCPosition) || @@ -567,6 +568,7 @@ class DocumentScene extends React.Component { )} {!isShare && !revision && ( <> +

test

diff --git a/app/scenes/Document/components/Header.tsx b/app/scenes/Document/components/Header.tsx index cb9cec7668..39319b2e08 100644 --- a/app/scenes/Document/components/Header.tsx +++ b/app/scenes/Document/components/Header.tsx @@ -117,7 +117,8 @@ function DocumentHeader({ const canToggleEmbeds = team?.documentEmbeds; const isShare = !!shareId; const showContents = - ui.tocVisible === true || (isShare && ui.tocVisible !== false); + (ui.tocVisible === true && !document.isTemplate) || + (isShare && ui.tocVisible !== false); const toc = ( ) : ( - {toc} + {document.isTemplate ? null : ( + <> + {toc} + + )} ) }