fix: Mobile shows menu button on shared documents without a menu

This commit is contained in:
Tom Moor
2024-02-08 20:44:14 -05:00
parent 84c97ae5ff
commit 55005d4447
2 changed files with 7 additions and 6 deletions

View File

@@ -34,16 +34,17 @@ const Link = styled.a`
fill: ${s("text")};
}
&:hover {
background: ${s("sidebarBackground")};
}
${breakpoint("tablet")`
z-index: ${depths.sidebar + 1};
background: ${s("sidebarBackground")};
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 16px;
&:hover {
background: ${s("sidebarControlHoverBackground")};
}
`};
`;

View File

@@ -190,7 +190,7 @@ function DocumentHeader({
<StyledHeader
$hidden={isEditingFocus}
title={document.title}
hasSidebar={!!sharedTree}
hasSidebar={sharedTree && sharedTree.children?.length > 0}
left={
isMobile ? (
<TableOfContentsMenu headings={headings} />