Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix navigating to notebooks & tags from note item (#8211)

01zulfi9a0de8dff807
diff --git a/apps/web/src/components/note/index.tsx b/apps/web/src/components/note/index.tsx
index 8d6624f89..a65d08c74 100644
--- a/apps/web/src/components/note/index.tsx
+++ b/apps/web/src/components/note/index.tsx
@@ -55,6 +55,7 @@ import { store } from "../../stores/note-store";
import { store as selectionStore } from "../../stores/selection-store";
import { store as tagStore } from "../../stores/tag-store";
import { store as userstore } from "../../stores/user-store";
+import { store as appStore } from "../../stores/app-store";
import { writeToClipboard } from "../../utils/clipboard";
import { showToast } from "../../utils/toast";
import IconTag from "../icon-tag";
@@ -229,6 +230,8 @@ function Note(props: NoteProps) {
e.stopPropagation();
if (!tag.id)
return showToast("error", strings.tagNotFound());
+
+ appStore.get().setNavigationTab("tags");
navigate(`/tags/${tag.id}`);
}}
text={tag.title}
@@ -243,6 +246,7 @@ function Note(props: NoteProps) {
<IconTag
key={notebook.id}
onClick={() => {
+ appStore.get().setNavigationTab("notebooks");
navigate(`/notebooks/${notebook.id}`);
}}
text={notebook.title}