mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 15:11:17 +10:00
fix TOC
This commit is contained in:
@ -55,19 +55,15 @@ export default function ShareShell({
|
|||||||
const readOnlyEditor = useAtomValue(readOnlyEditorAtom);
|
const readOnlyEditor = useAtomValue(readOnlyEditorAtom);
|
||||||
|
|
||||||
const [navbarOutside, setNavbarOutside] = useState<HTMLElement | null>(null);
|
const [navbarOutside, setNavbarOutside] = useState<HTMLElement | null>(null);
|
||||||
const [asideOutside, setAsideOutside] = useState<HTMLElement | null>(null);
|
|
||||||
|
|
||||||
useClickOutside(
|
useClickOutside(
|
||||||
() => {
|
() => {
|
||||||
if (mobileOpened) {
|
if (mobileOpened) {
|
||||||
toggleMobile();
|
toggleMobile();
|
||||||
}
|
}
|
||||||
if (mobileTocOpened) {
|
|
||||||
toggleTocMobile();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
[navbarOutside, asideOutside],
|
[navbarOutside],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -181,7 +177,6 @@ export default function ShareShell({
|
|||||||
p="md"
|
p="md"
|
||||||
withBorder={mobileTocOpened}
|
withBorder={mobileTocOpened}
|
||||||
className={classes.aside}
|
className={classes.aside}
|
||||||
ref={setAsideOutside}
|
|
||||||
>
|
>
|
||||||
<ScrollArea style={{ height: "80vh" }} scrollbarSize={5} type="scroll">
|
<ScrollArea style={{ height: "80vh" }} scrollbarSize={5} type="scroll">
|
||||||
<div style={{ paddingBottom: "50px" }}>
|
<div style={{ paddingBottom: "50px" }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user