mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Refactor routing in ExceptionsTable and ExceptionsRoutes for improved clarity and structure
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user