fix: Hide TOC toggle on publicly shared links if there are no headings in the document (#3172)
closes #3006
This commit is contained in:
@@ -36,6 +36,7 @@ import ShareButton from "./ShareButton";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
documentHasHeadings: boolean;
|
||||
sharedTree: NavigationNode | undefined;
|
||||
shareId: string | null | undefined;
|
||||
isDraft: boolean;
|
||||
@@ -60,6 +61,7 @@ type Props = {
|
||||
|
||||
function DocumentHeader({
|
||||
document,
|
||||
documentHasHeadings,
|
||||
shareId,
|
||||
isEditing,
|
||||
isDraft,
|
||||
@@ -175,7 +177,7 @@ function DocumentHeader({
|
||||
shareId={shareId}
|
||||
sharedTree={sharedTree}
|
||||
>
|
||||
{toc}
|
||||
{documentHasHeadings ? toc : null}
|
||||
</PublicBreadcrumb>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user