feat(collection/presentation): react to tree changes

This commit is contained in:
Elian Doran 2025-10-15 22:29:34 +03:00
parent b1babd62aa
commit c8b7322f1e
No known key found for this signature in database

View File

@ -17,14 +17,14 @@ const stylesheets = [
slideCustomStylesheet
].map(stylesheet => stylesheet.replace(/:root/g, ":host"));
export default function PresentationView({ note }: ViewModeProps<{}>) {
export default function PresentationView({ note, noteIds }: ViewModeProps<{}>) {
const [ presentation, setPresentation ] = useState<PresentationModel>();
const containerRef = useRef<HTMLDivElement>(null);
const apiRef = useRef<Reveal.Api>(null);
useLayoutEffect(() => {
buildPresentationModel(note).then(setPresentation);
}, [ note ]);
}, [ note, noteIds ]);
return presentation && (
<>