diff --git a/src/routes/v2/pages/Editor/components/EditorMenuBar/EditorMenuBar.tsx b/src/routes/v2/pages/Editor/components/EditorMenuBar/EditorMenuBar.tsx index 6cf6ff131..555b24467 100644 --- a/src/routes/v2/pages/Editor/components/EditorMenuBar/EditorMenuBar.tsx +++ b/src/routes/v2/pages/Editor/components/EditorMenuBar/EditorMenuBar.tsx @@ -11,7 +11,6 @@ import { Text } from "@/components/ui/typography"; import { usePipelineRename } from "@/routes/v2/pages/Editor/hooks/usePipelineRename"; import { useEditorSession } from "@/routes/v2/pages/Editor/store/EditorSessionContext"; import { AppMenuActions } from "@/routes/v2/shared/components/AppMenuActions"; -import { MenuTriggerButton } from "@/routes/v2/shared/components/MenuTriggerButton"; import { useSharedStores } from "@/routes/v2/shared/store/SharedStoreContext"; import { TOP_NAV_HEIGHT } from "@/utils/constants"; @@ -25,7 +24,7 @@ import { ViewMenu } from "./components/ViewMenu"; import { WindowsMenu } from "./components/WindowsMenu"; export const EditorMenuBar = observer(function EditorMenuBar() { - const { navigation, windows } = useSharedStores(); + const { navigation } = useSharedStores(); const { pipelineFile } = useEditorSession(); const handlePipelineRename = usePipelineRename(); const spec = navigation.activeSpec; @@ -99,11 +98,6 @@ export const EditorMenuBar = observer(function EditorMenuBar() { - windows.restoreWindow("pipeline-details")} - > - Notes - diff --git a/src/routes/v2/pages/Editor/components/EditorMenuBar/components/ComponentsLibraryMenu.tsx b/src/routes/v2/pages/Editor/components/EditorMenuBar/components/ComponentsLibraryMenu.tsx index 3b4e78b04..6081c8586 100644 --- a/src/routes/v2/pages/Editor/components/EditorMenuBar/components/ComponentsLibraryMenu.tsx +++ b/src/routes/v2/pages/Editor/components/EditorMenuBar/components/ComponentsLibraryMenu.tsx @@ -1,3 +1,4 @@ +import { useNavigate } from "@tanstack/react-router"; import { useRef } from "react"; import { ImportComponent } from "@/components/shared/ReactFlow/FlowSidebar/components"; @@ -9,11 +10,11 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Icon } from "@/components/ui/icon"; +import { APP_ROUTES } from "@/routes/router"; import { MenuTriggerButton } from "@/routes/v2/shared/components/MenuTriggerButton"; -import { useSharedStores } from "@/routes/v2/shared/store/SharedStoreContext"; export function ComponentsLibraryMenu() { - const { windows } = useSharedStores(); + const navigate = useNavigate(); const importTriggerRef = useRef(null); return ( @@ -24,17 +25,13 @@ export function ComponentsLibraryMenu() { windows.restoreWindow("component-library")} + onClick={() => + void navigate({ to: APP_ROUTES.DASHBOARD_COMPONENTS }) + } > Explore library - windows.restoreWindow("component-library")} - > - - My components - importTriggerRef.current?.click()}>