File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/twenty-front/src/modules/page-layout/hooks Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11import { useCallback } from 'react' ;
22
3+ import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu' ;
34import { CommandMenuPages } from '@/command-menu/types/CommandMenuPages' ;
45import { useSetRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentState' ;
56
@@ -22,6 +23,7 @@ export const useEditPageLayoutWidget = (pageLayoutIdFromProps?: string) => {
2223 ) ;
2324
2425 const { navigatePageLayoutCommandMenu } = useNavigatePageLayoutCommandMenu ( ) ;
26+ const { closeCommandMenu } = useCommandMenu ( ) ;
2527
2628 const handleEditWidget = useCallback (
2729 ( {
@@ -39,6 +41,7 @@ export const useEditPageLayoutWidget = (pageLayoutIdFromProps?: string) => {
3941 pageTitle : t `Edit iFrame` ,
4042 resetNavigationStack : true ,
4143 } ) ;
44+ return ;
4245 }
4346
4447 if ( widgetType === WidgetType . GRAPH ) {
@@ -47,9 +50,16 @@ export const useEditPageLayoutWidget = (pageLayoutIdFromProps?: string) => {
4750 pageTitle : t `Edit Graph` ,
4851 resetNavigationStack : true ,
4952 } ) ;
53+ return ;
5054 }
55+
56+ closeCommandMenu ( ) ;
5157 } ,
52- [ setPageLayoutEditingWidgetId , navigatePageLayoutCommandMenu ] ,
58+ [
59+ setPageLayoutEditingWidgetId ,
60+ navigatePageLayoutCommandMenu ,
61+ closeCommandMenu ,
62+ ] ,
5363 ) ;
5464
5565 return {
You can’t perform that action at this time.
0 commit comments