kbowers-ibm commented on code in PR #3042:
URL:
https://github.com/apache/incubator-kie-tools/pull/3042#discussion_r2095117620
##########
packages/runtime-tools-management-console-webapp/src/managementConsole/ManagementConsoleRoutes.tsx:
##########
@@ -33,110 +33,78 @@ import { ProcessDefinitionFormPage } from
"../process/form/ProcessDefinitionForm
export const ManagementConsoleRoutes: FC = () => {
const routes = useRoutes();
- const history = useHistory();
+ const navigate = useNavigate();
const onAddAuthSession = useCallback(
(authSession: AuthSession) => {
- history.push({
+ navigate({
pathname: routes.runtime.processes.path({
runtimeUrl: encodeURIComponent(authSession.runtimeUrl),
}),
search: isOpenIdConnectAuthSession(authSession) ?
`?user=${authSession.username}` : "",
});
},
- [history, routes.runtime.processes]
+ [navigate, routes.runtime.processes]
);
return (
<>
- <Switch>
- <Route exact path={routes.login.path({})}>
- <NewAuthSessionLoginSuccessPage onAddAuthSession={onAddAuthSession}
/>
+ <Routes>
+ <Route element={<RuntimeRoutesContext />}>
+ <Route
+ path={routes.login.path({})}
+ element={<NewAuthSessionLoginSuccessPage
onAddAuthSession={onAddAuthSession} />}
+ />
+ <Route path={routes.runtime.processes.path({ runtimeUrl:
":runtimeUrl" })} element={<ProcessListPage />} />
+ <Route
+ path={routes.runtime.processDetails.path({
+ runtimeUrl: ":runtimeUrl",
+ processInstanceId: ":processInstanceId",
+ })}
+ element={<ProcessDetailsPage />}
+ />
+ <Route path={routes.runtime.jobs.path({ runtimeUrl: ":runtimeUrl"
})} element={<JobsPage />} />
+ <Route path={routes.runtime.tasks.path({ runtimeUrl: ":runtimeUrl"
})} element={<TasksPage />} />
+ <Route
+ path={routes.runtime.processDefinitions.path({
+ runtimeUrl: ":runtimeUrl",
+ })}
+ >
Review Comment:
TaskDetailsPage is lower down I believe. This is for the
ProcessDefinitionsListPage and I've converted it to the v6 syntax
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]