diff --git a/frontend/src/components/group/GroupListBox.tsx b/frontend/src/components/group/GroupListBox.tsx index e5aec7a..503f377 100644 --- a/frontend/src/components/group/GroupListBox.tsx +++ b/frontend/src/components/group/GroupListBox.tsx @@ -2,6 +2,8 @@ import {Box, Heading} from "@steffo/bluelib-react" import * as React from "react" import {ManagedViewSet} from "../../hooks/useManagedViewSet" import {SophonResearchGroup} from "../../types/SophonTypes" +import {Empty} from "../elements/Empty" +import {Loading} from "../elements/Loading" import {GroupResourcePanel} from "./GroupResourcePanel" @@ -11,6 +13,19 @@ export interface GroupListBoxProps { export function GroupListBox({viewSet}: GroupListBoxProps): JSX.Element { + const resources = React.useMemo( + () => { + if(!viewSet.resources) { + return + } + if(viewSet.resources.length === 0) { + return This Sophon instance has no groups. + } + return viewSet.resources?.map(res => ) + }, + [viewSet], + ) + return ( @@ -19,7 +34,7 @@ export function GroupListBox({viewSet}: GroupListBoxProps): JSX.Element {

Research groups are groups of people that work together on one or more research projects.

- {viewSet.resources?.map(res => )} + {resources}
) }