Skip to content

Commit

Permalink
ref(insights): Split out Insights routes (#71016)
Browse files Browse the repository at this point in the history
Put all routes for current Performance modules into their own variable,
so I can more easily control where they nest. No benefit for now except
a bit of clarity, but this will make it easier for me to _move all these
routes_ under `/insights/` which is something we're doing soon.
  • Loading branch information
gggritso committed May 16, 2024
1 parent 2ead6c8 commit c36eade
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions static/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1447,17 +1447,8 @@ function buildRoutes() {
</Route>
);

const performanceRoutes = (
<Route
path="/performance/"
component={make(() => import('sentry/views/performance'))}
withOrgPath
>
<IndexRoute component={make(() => import('sentry/views/performance/content'))} />
<Route
path="trends/"
component={make(() => import('sentry/views/performance/trends'))}
/>
const insightsRoutes = (
<Fragment>
<Route path="database/">
<IndexRoute
component={make(
Expand Down Expand Up @@ -1572,6 +1563,20 @@ function buildRoutes() {
/>
</Route>
</Route>
</Fragment>
);

const performanceRoutes = (
<Route
path="/performance/"
component={make(() => import('sentry/views/performance'))}
withOrgPath
>
<IndexRoute component={make(() => import('sentry/views/performance/content'))} />
<Route
path="trends/"
component={make(() => import('sentry/views/performance/trends'))}
/>
<Route path="traces/">
<IndexRoute component={make(() => import('sentry/views/performance/traces'))} />
</Route>
Expand Down Expand Up @@ -1652,6 +1657,7 @@ function buildRoutes() {
path="trace/:traceSlug/"
component={make(() => import('sentry/views/performance/traceDetails'))}
/>
{insightsRoutes}
<Route
path=":eventSlug/"
component={make(() => import('sentry/views/performance/transactionDetails'))}
Expand Down

0 comments on commit c36eade

Please sign in to comment.