diff --git a/static-site/src/components/ListResources/IndividualResource.tsx b/static-site/src/components/ListResources/IndividualResource.tsx index 3e7d276ae..f45f40ae5 100644 --- a/static-site/src/components/ListResources/IndividualResource.tsx +++ b/static-site/src/components/ListResources/IndividualResource.tsx @@ -158,12 +158,14 @@ export const IndividualResource = ({resource, isMobile}: IndividualResourceProps ) } + const description = resource.lastUpdated ? `Last known update on ${resource.lastUpdated}` : ""; + return ( - + setModalResource(resource)}> diff --git a/static-site/src/components/ListResources/ResourceGroup.tsx b/static-site/src/components/ListResources/ResourceGroup.tsx index 82a244ae6..175e7e3aa 100644 --- a/static-site/src/components/ListResources/ResourceGroup.tsx +++ b/static-site/src/components/ListResources/ResourceGroup.tsx @@ -49,7 +49,7 @@ const ResourceGroupHeader = ({group, isMobile, setCollapsed, collapsible, isColl (however there may have been a more recent update since we indexed the data)'}> - {`Most recent snapshot: ${group.lastUpdated}`} + {group.lastUpdated !== "" && `Most recent snapshot: ${group.lastUpdated}`} )} diff --git a/static-site/src/components/ListResources/index.tsx b/static-site/src/components/ListResources/index.tsx index f5d82fe29..519087ea1 100644 --- a/static-site/src/components/ListResources/index.tsx +++ b/static-site/src/components/ListResources/index.tsx @@ -75,11 +75,17 @@ function ListResources({ return ( - + { showcaseCards.length > 0 && ( + + )} - + { groups[0].lastUpdated !== "" && ( + + ) || ( + + )} diff --git a/static-site/src/pages/groups.jsx b/static-site/src/pages/groups.jsx index 98c890058..3051ce81a 100644 --- a/static-site/src/pages/groups.jsx +++ b/static-site/src/pages/groups.jsx @@ -4,13 +4,14 @@ import { SmallSpacer, HugeSpacer, FlexCenter } from "../layouts/generalComponent import * as splashStyles from "../components/splash/styles"; import { fetchAndParseJSON } from "../util/datasetsHelpers"; import DatasetSelect from "../components/Datasets/dataset-select"; +import ListResources from "../components/ListResources/index"; import { GroupCards } from "../components/splash/groupCards"; import GenericPage from "../layouts/generic-page"; import { UserContext } from "../layouts/userDataWrapper"; import { DataFetchErrorParagraph } from "../components/splash/errorMessages"; import { groupsTitle, GroupsAbstract } from "../../data/SiteConfig"; -const sourceId = "charon/groups"; +const sourceUrl = "/charon/getAvailable?prefix=/groups/"; async function parseResourceListingCallback(response) { const datasets = (await response.json()).datasets; @@ -108,20 +109,21 @@ class GroupsPage extends React.Component { + Available Narratives + {this.state.dataLoaded && ( + columns={datasetColumns}/> )} { this.state.errorFetchingData && }