Browse Source

ref(insights): Split out Insights routes (#71016)

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.
George Gritsouk 10 months ago
parent
commit
c36eade356
1 changed files with 17 additions and 11 deletions
  1. 17 11
      static/app/routes.tsx

+ 17 - 11
static/app/routes.tsx

@@ -1447,17 +1447,8 @@ function buildRoutes() {
     </Route>
     </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/">
       <Route path="database/">
         <IndexRoute
         <IndexRoute
           component={make(
           component={make(
@@ -1572,6 +1563,20 @@ function buildRoutes() {
           />
           />
         </Route>
         </Route>
       </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/">
       <Route path="traces/">
         <IndexRoute component={make(() => import('sentry/views/performance/traces'))} />
         <IndexRoute component={make(() => import('sentry/views/performance/traces'))} />
       </Route>
       </Route>
@@ -1652,6 +1657,7 @@ function buildRoutes() {
         path="trace/:traceSlug/"
         path="trace/:traceSlug/"
         component={make(() => import('sentry/views/performance/traceDetails'))}
         component={make(() => import('sentry/views/performance/traceDetails'))}
       />
       />
+      {insightsRoutes}
       <Route
       <Route
         path=":eventSlug/"
         path=":eventSlug/"
         component={make(() => import('sentry/views/performance/transactionDetails'))}
         component={make(() => import('sentry/views/performance/transactionDetails'))}