diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d8f1b97..c5453ed 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -11,6 +11,7 @@ import {GroupRouter} from "./components/group/GroupRouter" import {InstanceRouter} from "./components/instance/InstanceRouter" import {InstanceStepPage} from "./components/instance/InstanceStepPage" import {DebugBox} from "./components/placeholder/DebugBox" +import {ProjectRouter} from "./components/project/ProjectRouter" import {ThemedBluelib} from "./components/theme/ThemedBluelib" import {ThemedTitle} from "./components/theme/ThemedTitle" import {AuthorizationProvider} from "./contexts/authorization" @@ -34,7 +35,13 @@ function App({}: RouteComponentProps) { selectedRoute={() => <> } - selectedRoute={DebugBox} + selectedRoute={(props) => <> + + } /> } /> diff --git a/frontend/src/components/project/ProjectRouter.tsx b/frontend/src/components/project/ProjectRouter.tsx new file mode 100644 index 0000000..52ec0a0 --- /dev/null +++ b/frontend/src/components/project/ProjectRouter.tsx @@ -0,0 +1,24 @@ +import * as React from "react" +import {useManagedViewSet} from "../../hooks/useManagedViewSet" +import {Dict} from "../../types/ExtraTypes" +import {SophonResearchProject} from "../../types/SophonTypes" +import {ViewSetRouter} from "../routing/ViewSetRouter" + + +export interface ProjectRouterProps { + groupPk: string, + unselectedRoute: (props: Dict) => JSX.Element | null, + selectedRoute: (props: Dict) => JSX.Element | null, +} + + +export function ProjectRouter({groupPk, ...props}: ProjectRouterProps): JSX.Element { + return ( + (`/api/projects/by-group/${groupPk}`, "slug")} + pathSegment={"researchGroup"} + pkKey={"slug"} + /> + ) +}