From ac98ecf3fc28f0cb0ae61b3633bafacbb0bba4a6 Mon Sep 17 00:00:00 2001 From: Davinder Kumar Date: Fri, 23 May 2025 14:02:56 +0530 Subject: [PATCH] Fix/exit settings link stuck 12235 (#12243) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🛠️ What this PR fixes Fixes #12235 The "Exit Settings" link was stuck after navigating using a keyboard shortcut(s). This PR ensures the Exit Settings button works correctly. ## 🎥 Demo The attached video demonstrates the issue being fixed and the link behaving correctly. **Note:** You can view the shortcuts I pressed in the bottom-left corner of the video. To ensure they are clearly visible, avoid letting the video’s progress bar overlap them by moving the cursor away from the video after starting playback. https://github.com/user-attachments/assets/4d705ddd-7b48-45c1-a292-127b9a88b68d --------- Co-authored-by: Davinder Kumar --- .../app/effect-components/GotoHotkeysEffectsProvider.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/twenty-front/src/modules/app/effect-components/GotoHotkeysEffectsProvider.tsx b/packages/twenty-front/src/modules/app/effect-components/GotoHotkeysEffectsProvider.tsx index 636d285fd..44975bce3 100644 --- a/packages/twenty-front/src/modules/app/effect-components/GotoHotkeysEffectsProvider.tsx +++ b/packages/twenty-front/src/modules/app/effect-components/GotoHotkeysEffectsProvider.tsx @@ -2,17 +2,13 @@ import { GoToHotkeyItemEffect } from '@/app/effect-components/GoToHotkeyItemEffe import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems'; import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded'; import { navigationDrawerExpandedMemorizedState } from '@/ui/navigation/states/navigationDrawerExpandedMemorizedState'; -import { navigationMemorizedUrlState } from '@/ui/navigation/states/navigationMemorizedUrlState'; import { useGoToHotkeys } from '@/ui/utilities/hotkey/hooks/useGoToHotkeys'; -import { useLocation } from 'react-router-dom'; import { useRecoilCallback } from 'recoil'; export const GotoHotkeysEffectsProvider = () => { const { activeNonSystemObjectMetadataItems } = useFilteredObjectMetadataItems(); - const location = useLocation(); - useGoToHotkeys({ key: 's', location: '/settings/profile', @@ -21,9 +17,8 @@ export const GotoHotkeysEffectsProvider = () => { () => { set(isNavigationDrawerExpandedState, true); set(navigationDrawerExpandedMemorizedState, true); - set(navigationMemorizedUrlState, location.pathname + location.search); }, - [location.pathname, location.search], + [], ), });