File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import { Text } from "@/components/ui/typography";
1111import { usePipelineRename } from "@/routes/v2/pages/Editor/hooks/usePipelineRename" ;
1212import { useEditorSession } from "@/routes/v2/pages/Editor/store/EditorSessionContext" ;
1313import { AppMenuActions } from "@/routes/v2/shared/components/AppMenuActions" ;
14- import { MenuTriggerButton } from "@/routes/v2/shared/components/MenuTriggerButton" ;
1514import { useSharedStores } from "@/routes/v2/shared/store/SharedStoreContext" ;
1615import { TOP_NAV_HEIGHT } from "@/utils/constants" ;
1716
@@ -25,7 +24,7 @@ import { ViewMenu } from "./components/ViewMenu";
2524import { WindowsMenu } from "./components/WindowsMenu" ;
2625
2726export const EditorMenuBar = observer ( function EditorMenuBar ( ) {
28- const { navigation, windows } = useSharedStores ( ) ;
27+ const { navigation } = useSharedStores ( ) ;
2928 const { pipelineFile } = useEditorSession ( ) ;
3029 const handlePipelineRename = usePipelineRename ( ) ;
3130 const spec = navigation . activeSpec ;
@@ -99,11 +98,6 @@ export const EditorMenuBar = observer(function EditorMenuBar() {
9998 < FileMenu />
10099 < ViewMenu />
101100 < RunsMenu />
102- < MenuTriggerButton
103- onClick = { ( ) => windows . restoreWindow ( "pipeline-details" ) }
104- >
105- Notes
106- </ MenuTriggerButton >
107101 < ComponentsLibraryMenu />
108102 < WindowsMenu />
109103 < NodeMenu />
Original file line number Diff line number Diff line change 1+ import { useNavigate } from "@tanstack/react-router" ;
12import { useRef } from "react" ;
23
34import { ImportComponent } from "@/components/shared/ReactFlow/FlowSidebar/components" ;
@@ -9,11 +10,11 @@ import {
910 DropdownMenuTrigger ,
1011} from "@/components/ui/dropdown-menu" ;
1112import { Icon } from "@/components/ui/icon" ;
13+ import { APP_ROUTES } from "@/routes/router" ;
1214import { MenuTriggerButton } from "@/routes/v2/shared/components/MenuTriggerButton" ;
13- import { useSharedStores } from "@/routes/v2/shared/store/SharedStoreContext" ;
1415
1516export function ComponentsLibraryMenu ( ) {
16- const { windows } = useSharedStores ( ) ;
17+ const navigate = useNavigate ( ) ;
1718 const importTriggerRef = useRef < HTMLButtonElement > ( null ) ;
1819
1920 return (
@@ -24,17 +25,13 @@ export function ComponentsLibraryMenu() {
2425 </ DropdownMenuTrigger >
2526 < DropdownMenuContent align = "start" sideOffset = { 2 } >
2627 < DropdownMenuItem
27- onClick = { ( ) => windows . restoreWindow ( "component-library" ) }
28+ onClick = { ( ) =>
29+ void navigate ( { to : APP_ROUTES . DASHBOARD_COMPONENTS } )
30+ }
2831 >
2932 < Icon name = "Library" size = "sm" />
3033 Explore library
3134 </ DropdownMenuItem >
32- < DropdownMenuItem
33- onClick = { ( ) => windows . restoreWindow ( "component-library" ) }
34- >
35- < Icon name = "User" size = "sm" />
36- My components
37- </ DropdownMenuItem >
3835 < DropdownMenuSeparator />
3936 < DropdownMenuItem onClick = { ( ) => importTriggerRef . current ?. click ( ) } >
4037 < Icon name = "PackagePlus" size = "sm" />
You can’t perform that action at this time.
0 commit comments