mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 14:49:01 +02:00
feat(collection/presentation): react to tree changes
This commit is contained in:
parent
b1babd62aa
commit
c8b7322f1e
@ -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 && (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user