Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
docs(client): put useActiveNoteContext's description back on it
Elian Dorande498e17984d
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex 56aa2f9e91..f10613fea3 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -569,10 +569,6 @@ export function isContextInActiveTab(return activeMainNtxId === noteContext.getMainContext().ntxId;}-/**- * Similar to {@link useNoteContext}, but instead of using the note context from the split container that the component is part of, it uses the active note context instead- * (the note currently focused by the user).- *//*** Registers `noteContext`, built outside the tab row, with `TabManager` for as long as the component* uses it, so that commands naming its `ntxId` resolve to it.@@ -584,6 +580,10 @@ export function useDetachedNoteContext(noteContext: NoteContext) {}, [ noteContext ]);}+/**+ * Similar to {@link useNoteContext}, but instead of using the note context from the split container that the component is part of, it uses the active note context instead+ * (the note currently focused by the user).+ */export function useActiveNoteContext() {const [ noteContext, setNoteContext ] = useState<NoteContext | undefined>(appContext.tabManager.getActiveContext() ?? undefined);const [ notePath, setNotePath ] = useState<string | null | undefined>();