From 955aa52503e55b6629a5abff3b714526f21f6242 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 7 Oct 2021 19:33:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Add=20status=20text=20to=20the?= =?UTF-8?q?=20`ProjectListBox`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/project/ProjectListBox.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/project/ProjectListBox.tsx b/frontend/src/components/project/ProjectListBox.tsx index 97dfffc..7e713a1 100644 --- a/frontend/src/components/project/ProjectListBox.tsx +++ b/frontend/src/components/project/ProjectListBox.tsx @@ -2,6 +2,8 @@ import {Box, Heading} from "@steffo/bluelib-react" import * as React from "react" import {ManagedViewSet} from "../../hooks/useManagedViewSet" import {SophonResearchProject} from "../../types/SophonTypes" +import {Empty} from "../elements/Empty" +import {Loading} from "../elements/Loading" import {ProjectResourcePanel} from "./ProjectResourcePanel" @@ -11,6 +13,19 @@ export interface ProjectListBoxProps { export function ProjectListBox({viewSet}: ProjectListBoxProps): JSX.Element { + const resources = React.useMemo( + () => { + if(!viewSet.resources) { + return + } + if(viewSet.resources.length === 0) { + return This group owns no projects. + } + return viewSet.resources?.map(res => ) + }, + [viewSet], + ) + return ( @@ -19,7 +34,7 @@ export function ProjectListBox({viewSet}: ProjectListBoxProps): JSX.Element {

Research projects are containers for all kind of research data pertaining to a specific topic.

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