1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-23 15:24:21 +00:00
sophon/frontend/src/components/group/GroupRouter.tsx

23 lines
674 B
TypeScript
Raw Normal View History

2021-10-07 00:14:34 +00:00
import * as React from "react"
import {useManagedViewSet} from "../../hooks/useManagedViewSet"
import {SophonResearchGroup} from "../../types/SophonTypes"
import {ViewSetRouter} from "../routing/ViewSetRouter"
2021-10-07 00:14:34 +00:00
export interface GroupRouterProps {
unselectedRoute: (props: any) => JSX.Element | null,
selectedRoute: (props: 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")}
pathSegment={"researchGroup"}
pkKey={"slug"}
2021-10-07 00:14:34 +00:00
/>
)
}