From f16818ea93a2aed0e34bf2e309131aa1706bcb6d Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Tue, 17 Jun 2025 10:18:19 +0500 Subject: [PATCH] web: fix tag navigation from editor --- apps/web/src/components/editor/header.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/editor/header.tsx b/apps/web/src/components/editor/header.tsx index b70c8517e..1238e3228 100644 --- a/apps/web/src/components/editor/header.tsx +++ b/apps/web/src/components/editor/header.tsx @@ -21,6 +21,7 @@ import { useCallback, useEffect, useRef } from "react"; import { useEditorStore } from "../../stores/editor-store"; import { useStore as useTagStore } from "../../stores/tag-store"; import { useStore as useNoteStore } from "../../stores/note-store"; +import { useStore as useAppStore } from "../../stores/app-store"; import { Input } from "@theme-ui/components"; import { Tag as TagIcon, Plus } from "../icons"; import { Flex } from "@theme-ui/components"; @@ -78,7 +79,10 @@ function Header(props: HeaderProps) { key={tag.id} text={tag.title} icon={TagIcon} - onClick={() => navigate(`/tags/${tag.id}`)} + onClick={() => { + useAppStore.getState().setNavigationTab("tags"); + navigate(`/tags/${tag.id}`); + }} onDismiss={ readonly || !noteId ? undefined