1- import type { PlainRoute } from " sentry/types/legacyReactRouter" ;
2- import type { Organization } from " sentry/types/organization" ;
3- import { normalizeUrl } from " sentry/utils/url/normalizeUrl" ;
4- import { useOrganization } from " sentry/utils/useOrganization" ;
5- import { useParams } from " sentry/utils/useParams" ;
6- import { useRoutes } from " sentry/utils/useRoutes" ;
7- import { Tab , TabPaths } from " sentry/views/issueDetails/types" ;
1+ import type { PlainRoute } from ' sentry/types/legacyReactRouter' ;
2+ import type { Organization } from ' sentry/types/organization' ;
3+ import { normalizeUrl } from ' sentry/utils/url/normalizeUrl' ;
4+ import { useOrganization } from ' sentry/utils/useOrganization' ;
5+ import { useParams } from ' sentry/utils/useParams' ;
6+ import { useRoutes } from ' sentry/utils/useRoutes' ;
7+ import { Tab , TabPaths } from ' sentry/views/issueDetails/types' ;
88
99function getCurrentTab ( {
1010 routes,
@@ -20,8 +20,7 @@ function getCurrentTab({
2020 return Tab . DISTRIBUTIONS ;
2121 }
2222 return (
23- Object . values ( Tab ) . find ( ( tab ) => currentRoute ?. path === TabPaths [ tab ] ) ??
24- Tab . DETAILS
23+ Object . values ( Tab ) . find ( tab => currentRoute ?. path === TabPaths [ tab ] ) ?? Tab . DETAILS
2524 ) ;
2625}
2726
@@ -41,15 +40,15 @@ function getCurrentRouteInfo({
4140 baseUrl : string ;
4241 currentTab : Tab ;
4342} {
44- const currentTab = getCurrentTab ( { routes, params } ) ;
43+ const currentTab = getCurrentTab ( { routes, params} ) ;
4544
4645 const baseUrl = normalizeUrl (
4746 `/organizations/${ organization . slug } /issues/${ groupId } /${
48- params . eventId && eventId ? `events/${ eventId } /` : ""
47+ params . eventId && eventId ? `events/${ eventId } /` : ''
4948 } `
5049 ) ;
5150
52- return { baseUrl, currentTab } ;
51+ return { baseUrl, currentTab} ;
5352}
5453
5554export function useGroupDetailsRoute ( ) : {
0 commit comments