Refactor routing in ExceptionsTable and ExceptionsRoutes for improved clarity and structure

This commit is contained in:
Nawaz Dhandala
2026-01-08 19:22:15 +00:00
parent c562af4d90
commit dbd3742bbe
2 changed files with 17 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ const TelemetryExceptionTable: FunctionComponent<ComponentProps> = (
props: ComponentProps,
): ReactElement => {
let viewRoute: Route = RouteUtil.populateRouteParams(
RouteMap[PageMap.TELEMETRY_EXCEPTIONS_ROOT]!,
RouteMap[PageMap.EXCEPTIONS_VIEW]!,
);
if (props.telemetryServiceId) {

View File

@@ -91,23 +91,24 @@ const ExceptionsRoutes: FunctionComponent<ComponentProps> = (
</Suspense>
}
/>
</PageRoute>
{/* Exception View - separate from main layout */}
<PageRoute
path={ExceptionsRoutePath[PageMap.EXCEPTIONS_VIEW] || ""}
element={<ExceptionViewLayout {...props} />}
>
<PageRoute
path={ExceptionsRoutePath[PageMap.EXCEPTIONS_VIEW] || ""}
element={<ExceptionViewLayout {...props} />}
>
<PageRoute
index
element={
<Suspense fallback={Loader}>
<ExceptionView
{...props}
pageRoute={RouteMap[PageMap.EXCEPTIONS_VIEW] as Route}
/>
</Suspense>
}
/>
</PageRoute>
index
element={
<Suspense fallback={Loader}>
<ExceptionView
{...props}
pageRoute={RouteMap[PageMap.EXCEPTIONS_VIEW] as Route}
/>
</Suspense>
}
/>
</PageRoute>
</Routes>
);