diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsx index a5a7c037c..db936228d 100644 --- a/apps/client/src/widgets/NoteDetail.tsx +++ b/apps/client/src/widgets/NoteDetail.tsx @@ -8,6 +8,7 @@ import { TypeWidgetProps } from "./type_widgets/type_widget"; import "./NoteDetail.css"; import attributes from "../services/attributes"; import { ExtendedNoteType, TYPE_MAPPINGS } from "./note_types"; +import { isMobile } from "../services/utils"; /** * The note detail is in charge of rendering the content of a note, by determining its type (e.g. text, code) and using the appropriate view widget. @@ -95,6 +96,13 @@ export default function NoteDetail() { } }); + // Fixed tree for launch bar config on mobile. + useEffect(() => { + if (!isMobile) return; + const hasFixedTree = noteContext?.hoistedNoteId === "_lbMobileRoot"; + document.body.classList.toggle("force-fixed-tree", hasFixedTree); + }, [ note ]); + return (