Skip to content

Commit b82d2fe

Browse files
ref(routes): replace stats nav-v2 redirect with route-level redirects
The navigation-sidebar-v2 feature flag is now fully launched, so the OrganizationStatsWrapper component and its useRedirectNavigationV2Routes hook are no longer needed. Replace with declarative redirectTo entries in the route definitions, pointing /stats/* to /settings/stats/*. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9bcfd0f commit b82d2fe

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

static/app/router/routes.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {OverviewWrapper} from 'sentry/views/issueList/overviewWrapper';
3636
import {IssueTaxonomy} from 'sentry/views/issueList/taxonomies';
3737
import {OrganizationContainerRoute} from 'sentry/views/organizationContainer';
3838
import {OrganizationLayout} from 'sentry/views/organizationLayout';
39-
import {OrganizationStatsWrapper} from 'sentry/views/organizationStats/organizationStatsWrapper';
4039
import {Tab as TransactionSummaryTab} from 'sentry/views/performance/transactionSummary/tabs';
4140
import {ProjectEventRedirect} from 'sentry/views/projectEventRedirect';
4241
import {redirectDeprecatedProjectRoute} from 'sentry/views/projects/redirectDeprecatedProjectRoute';
@@ -814,12 +813,21 @@ function buildRoutes(): RouteObject[] {
814813
{
815814
path: '/stats/',
816815
withOrgPath: true,
817-
component: OrganizationStatsWrapper,
818-
children: statsChildren,
816+
redirectTo: '/settings/stats/',
817+
},
818+
{
819+
path: '/stats/issues/',
820+
withOrgPath: true,
821+
redirectTo: '/settings/stats/issues/',
822+
},
823+
{
824+
path: '/stats/health/',
825+
withOrgPath: true,
826+
redirectTo: '/settings/stats/health/',
819827
},
820828
{
821829
path: '/organizations/:orgId/stats/team/',
822-
redirectTo: '/organizations/:orgId/stats/issues/',
830+
redirectTo: '/organizations/:orgId/settings/stats/issues/',
823831
},
824832
],
825833
};

static/app/views/organizationStats/organizationStatsWrapper.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)