@@ -34,11 +34,9 @@ import {
3434 IconUser ,
3535} from 'sentry/icons' ;
3636import { t } from 'sentry/locale' ;
37- import { ConfigStore } from 'sentry/stores/configStore' ;
3837import { apiOptions } from 'sentry/utils/api/apiOptions' ;
3938import { isActiveSuperuser } from 'sentry/utils/isActiveSuperuser' ;
4039import { QUERY_API_CLIENT , useMutation } from 'sentry/utils/queryClient' ;
41- import { replaceRouterParams } from 'sentry/utils/replaceRouterParams' ;
4240import { useMutateUserOptions } from 'sentry/utils/useMutateUserOptions' ;
4341import { useOrganization } from 'sentry/utils/useOrganization' ;
4442import { useProjects } from 'sentry/utils/useProjects' ;
@@ -52,8 +50,6 @@ import {MOBILE_LANDING_SUB_PATH} from 'sentry/views/insights/pages/mobile/settin
5250import { ISSUE_TAXONOMY_CONFIG } from 'sentry/views/issueList/taxonomies' ;
5351import { useStarredIssueViews } from 'sentry/views/navigation/secondary/sections/issues/issueViews/useStarredIssueViews' ;
5452import { getUserOrgNavigationConfiguration } from 'sentry/views/settings/organization/userOrgNavigationConfiguration' ;
55- import { getNavigationConfiguration } from 'sentry/views/settings/project/navigationConfiguration' ;
56- import type { NavigationGroupProps } from 'sentry/views/settings/types' ;
5753
5854import { CMDKAction } from './cmdk' ;
5955import { CommandPaletteSlot } from './commandPaletteSlot' ;
@@ -206,32 +202,11 @@ export function GlobalCommandPaletteActions() {
206202 ) }
207203
208204 < CMDKAction display = { { label : t ( 'Settings' ) , icon : < IconSettings /> } } >
209- { getUserOrgNavigationConfiguration ( ) . map ( section => {
210- const orgNavContext : NavigationGroupProps = {
211- ...section ,
212- organization,
213- access : new Set ( organization . access ?? [ ] ) ,
214- features : new Set ( organization . features ?? [ ] ) ,
215- isSelfHosted : ConfigStore . get ( 'isSelfHosted' ) ,
216- } ;
217- return (
218- < CMDKAction key = { section . name } display = { { label : section . name } } >
219- { section . items
220- . filter ( item =>
221- typeof item . show === 'function'
222- ? item . show ( orgNavContext )
223- : item . show !== false
224- )
225- . map ( item => (
226- < CMDKAction
227- key = { item . path }
228- display = { { label : item . title , details : item . description } }
229- to = { replaceRouterParams ( item . path , { orgId : organization . slug } ) }
230- />
231- ) ) }
232- </ CMDKAction >
233- ) ;
234- } ) }
205+ { getUserOrgNavigationConfiguration ( ) . flatMap ( section =>
206+ section . items . map ( item => (
207+ < CMDKAction key = { item . path } display = { { label : item . title } } to = { item . path } />
208+ ) )
209+ ) }
235210 </ CMDKAction >
236211
237212 < CMDKAction
@@ -245,33 +220,8 @@ export function GlobalCommandPaletteActions() {
245220 label : project . name ,
246221 icon : < ProjectAvatar project = { project } size = { 16 } /> ,
247222 } }
248- >
249- { getNavigationConfiguration ( { organization, project} ) . flatMap ( section => {
250- const projectNavContext = {
251- ...section ,
252- organization,
253- project,
254- access : new Set ( organization . access ?? [ ] ) ,
255- features : new Set ( project . features ?? [ ] ) ,
256- } ;
257- return section . items
258- . filter ( item =>
259- typeof item . show === 'function'
260- ? item . show ( projectNavContext )
261- : item . show !== false
262- )
263- . map ( item => (
264- < CMDKAction
265- key = { item . path }
266- display = { { label : item . title , details : item . description } }
267- to = { replaceRouterParams ( item . path , {
268- orgId : organization . slug ,
269- projectId : project . slug ,
270- } ) }
271- />
272- ) ) ;
273- } ) }
274- </ CMDKAction >
223+ to = { `/settings/${ organization . slug } /projects/${ project . slug } /` }
224+ />
275225 ) ) }
276226 </ CMDKAction >
277227 </ CMDKAction >
0 commit comments