Skip to content

Build your personal knowledge base with Trilium Notes

fix(breadcrumbs): not showing on first render

Elian Doranc1e01467a5fb
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx
index 10a5983c6e..9a3b690ebc 100644
--- a/apps/client/src/widgets/react/hooks.tsx
+++ b/apps/client/src/widgets/react/hooks.tsx
@@ -369,7 +369,8 @@ export function useActiveNoteContext() {
useEffect(() => {
setNote(noteContext?.note);
- }, [ notePath ]);
+ setNotePath(noteContext?.notePath);
+ }, [ notePath, noteContext?.note, noteContext?.notePath ]);
useTriliumEvents([ "setNoteContext", "activeContextChanged", "noteSwitchedAndActivated", "noteSwitched" ], () => {
const noteContext = appContext.tabManager.getActiveContext() ?? undefined;