2021-10-07 00:14:34 +00:00
|
|
|
import * as React from "react"
|
|
|
|
import {useManagedViewSet} from "../../hooks/useManagedViewSet"
|
2021-10-07 03:06:31 +00:00
|
|
|
import {Dict} from "../../types/ExtraTypes"
|
2021-10-07 00:14:34 +00:00
|
|
|
import {SophonResearchGroup} from "../../types/SophonTypes"
|
2021-10-07 03:06:31 +00:00
|
|
|
import {ViewSetRouter} from "../routing/ViewSetRouter"
|
2021-10-07 00:14:34 +00:00
|
|
|
|
|
|
|
|
2021-10-07 03:06:31 +00:00
|
|
|
export interface GroupRouterProps {
|
|
|
|
unselectedRoute: (props: Dict<any>) => JSX.Element | null,
|
|
|
|
selectedRoute: (props: Dict<any>) => JSX.Element | null,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function GroupRouter({...props}: GroupRouterProps): JSX.Element {
|
2021-10-07 00:14:34 +00:00
|
|
|
return (
|
|
|
|
<ViewSetRouter
|
|
|
|
{...props}
|
|
|
|
viewSet={useManagedViewSet<SophonResearchGroup>("/api/core/groups/", "slug")}
|
2021-10-07 03:06:31 +00:00
|
|
|
pathSegment={"researchGroup"}
|
|
|
|
pkKey={"slug"}
|
2021-10-07 00:14:34 +00:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|