@@ -32,7 +32,6 @@ import { getRecordIndexIdFromObjectNamePluralAndViewId } from '@/object-record/u
32
32
import { AppBasePath } from '@/types/AppBasePath' ;
33
33
import { AppPath } from '@/types/AppPath' ;
34
34
import { PageHotkeyScope } from '@/types/PageHotkeyScope' ;
35
- import { SettingsPath } from '@/types/SettingsPath' ;
36
35
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope' ;
37
36
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2' ;
38
37
import { isDefined } from 'twenty-shared/utils' ;
@@ -152,27 +151,12 @@ export const PageChangeEffect = () => {
152
151
break ;
153
152
}
154
153
case isMatchingLocation ( location , AppPath . RecordShowPage ) : {
155
- setHotkeyScope ( PageHotkeyScope . CompanyShowPage , {
154
+ setHotkeyScope ( PageHotkeyScope . RecordShowPage , {
156
155
goto : true ,
157
156
keyboardShortcutMenu : true ,
158
157
} ) ;
159
158
break ;
160
159
}
161
- case isMatchingLocation ( location , AppPath . OpportunitiesPage ) : {
162
- setHotkeyScope ( PageHotkeyScope . OpportunitiesPage , {
163
- goto : true ,
164
- keyboardShortcutMenu : true ,
165
- } ) ;
166
- break ;
167
- }
168
- case isMatchingLocation ( location , AppPath . TasksPage ) : {
169
- setHotkeyScope ( PageHotkeyScope . TaskPage , {
170
- goto : true ,
171
- keyboardShortcutMenu : true ,
172
- } ) ;
173
- break ;
174
- }
175
-
176
160
case isMatchingLocation ( location , AppPath . SignInUp ) : {
177
161
setHotkeyScope ( PageHotkeyScope . SignInUp ) ;
178
162
break ;
@@ -201,47 +185,12 @@ export const PageChangeEffect = () => {
201
185
setHotkeyScope ( PageHotkeyScope . PlanRequired ) ;
202
186
break ;
203
187
}
204
- case isMatchingLocation (
205
- location ,
206
- SettingsPath . ProfilePage ,
207
- AppBasePath . Settings ,
208
- ) : {
209
- setHotkeyScope ( PageHotkeyScope . ProfilePage , {
210
- goto : true ,
211
- keyboardShortcutMenu : true ,
212
- } ) ;
213
- break ;
214
- }
215
- case isMatchingLocation (
216
- location ,
217
- SettingsPath . Domain ,
218
- AppBasePath . Settings ,
219
- ) : {
220
- setHotkeyScope ( PageHotkeyScope . Settings , {
221
- goto : false ,
222
- keyboardShortcutMenu : true ,
223
- } ) ;
224
- break ;
225
- }
226
- case isMatchingLocation (
227
- location ,
228
- SettingsPath . RestPlayground ,
229
- AppBasePath . Settings ,
230
- ) : {
188
+ case location . pathname . startsWith ( AppBasePath . Settings ) : {
231
189
setHotkeyScope ( PageHotkeyScope . Settings , {
232
190
goto : false ,
233
- keyboardShortcutMenu : true ,
234
- } ) ;
235
- break ;
236
- }
237
- case isMatchingLocation (
238
- location ,
239
- SettingsPath . WorkspaceMembersPage ,
240
- AppBasePath . Settings ,
241
- ) : {
242
- setHotkeyScope ( PageHotkeyScope . WorkspaceMemberPage , {
243
- goto : true ,
244
- keyboardShortcutMenu : true ,
191
+ keyboardShortcutMenu : false ,
192
+ commandMenu : false ,
193
+ commandMenuOpen : false ,
245
194
} ) ;
246
195
break ;
247
196
}
0 commit comments