Skip to content

Commit

Permalink
fix session pages
Browse files Browse the repository at this point in the history
  • Loading branch information
leafty committed Jan 15, 2025
1 parent 7f6039f commit 6d2621f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
27 changes: 13 additions & 14 deletions client/src/features/session/components/ProjectSessionsRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

import { Route, Switch } from "react-router";
import { Route, Routes } from "react-router-dom-v5-compat";
import { Col } from "reactstrap";

import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook";
Expand Down Expand Up @@ -44,26 +44,25 @@ export default function ProjectSessionsRouter() {
const startSessionUrl = Url.get(
Url.pages.project.session.new,
projectUrlData
);
).slice(sessionsListUrl.length);
const sessionShowUrl = Url.get(Url.pages.project.session.show, {
namespace,
path,
server: ":server",
});
}).slice(sessionsListUrl.length);

return (
<Col key="content" xs={12}>
<Switch>
<Route exact path={sessionsListUrl}>
<ProjectSessionsList projectPathWithNamespace={pathWithNamespace} />
</Route>
<Route path={startSessionUrl}>
<StartNewSession />
</Route>
<Route path={sessionShowUrl}>
<ShowSession />
</Route>
</Switch>
<Routes>
<Route
index
element={
<ProjectSessionsList projectPathWithNamespace={pathWithNamespace} />
}
/>
<Route path={startSessionUrl} element={<StartNewSession />} />
<Route path={sessionShowUrl} element={<ShowSession />} />
</Routes>
</Col>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
ModalHeader,
UncontrolledTooltip,
} from "reactstrap";

import { Loader } from "../../../components/Loader";
import EnvironmentLogsV2 from "../../../components/LogsV2";
import { TimeCaption } from "../../../components/TimeCaption";
Expand Down
4 changes: 2 additions & 2 deletions client/src/project/Project.present.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -977,9 +977,9 @@ function ProjectView(props) {
metadataVersion={metadataVersion}
/>
</CompatRoute>
<Route path={props.notebookServersUrl}>
<CompatRoute path={props.notebookServersUrl}>
<ProjectSessionsRouter key="sessions" />
</Route>
</CompatRoute>
<Route component={NotFoundInsideProject} />
</Switch>
</Row>
Expand Down

0 comments on commit 6d2621f

Please sign in to comment.