Fix/exit settings link stuck 12235 (#12243)

## 🛠️ 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 <davinder.kumar@intverse.io>
This commit is contained in:
Davinder Kumar
2025-05-23 14:02:56 +05:30
committed by GitHub
parent cced069d28
commit ac98ecf3fc

View File

@ -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],
[],
),
});