From f1cb6fa1698a5b29bf8ad687dc3098eaabe26c35 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 1 Mar 2024 17:18:36 +0100 Subject: [PATCH] wip --- apps/nar-v3/src/components/DatasetList.jsx | 22 ++++++++++------ apps/nar-v3/src/routes/dataset.jsx | 30 +++++++++++++++++----- apps/nar-v3/src/routes/datasets.jsx | 4 +-- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/apps/nar-v3/src/components/DatasetList.jsx b/apps/nar-v3/src/components/DatasetList.jsx index 4250d1d..c948b7c 100644 --- a/apps/nar-v3/src/components/DatasetList.jsx +++ b/apps/nar-v3/src/components/DatasetList.jsx @@ -1,13 +1,19 @@ +import { Link as RouterLink } from "react-router-dom"; - +import { uuidFromUri } from "../utility"; function DatasetList(props) { - - return ; + return ( + + ); } -export default DatasetList; \ No newline at end of file +export default DatasetList; diff --git a/apps/nar-v3/src/routes/dataset.jsx b/apps/nar-v3/src/routes/dataset.jsx index 6a3b12b..f975496 100644 --- a/apps/nar-v3/src/routes/dataset.jsx +++ b/apps/nar-v3/src/routes/dataset.jsx @@ -2,12 +2,23 @@ import React from "react"; import { Await, defer, useLoaderData } from "react-router-dom"; import { datastore } from "../datastore"; -//import Navigation from "../components/Navigation"; +import { uuidFromUri } from "../utility.js"; +import Navigation from "../components/Navigation"; import DatasetCard from "../components/DatasetCard"; import ProgressIndicator from "../components/ProgressIndicator"; -const query = null; - +const query = buildKGQuery("core/DatasetVersion", [ + S("@id"), + S("fullName"), + S("description"), + S("shortName"), + S("versionIdentifier"), + R("isVersionOf", "hasVersion", [ + S("fullName"), + S("description"), + S("shortName"), + ]), +]); export async function loader({ params }) { const datasetPromise = datastore.getKGItem( "datasets detail", @@ -23,14 +34,21 @@ function Dataset(props) { return (
- {/* */} - }> Error loading dataset.

} > - {(dataset) => } + {(dataset) => { + return ( + <> + + + + ); + }}
diff --git a/apps/nar-v3/src/routes/datasets.jsx b/apps/nar-v3/src/routes/datasets.jsx index ef3cb77..d26c6a3 100644 --- a/apps/nar-v3/src/routes/datasets.jsx +++ b/apps/nar-v3/src/routes/datasets.jsx @@ -3,7 +3,7 @@ import { Await, defer, useLoaderData } from "react-router-dom"; import { buildKGQuery, simpleProperty as S, linkProperty as L, reverseLinkProperty as R } from "../queries"; import { datastore } from "../datastore"; -//import Navigation from "../components/Navigation"; +import Navigation from "../components/Navigation"; import DatasetList from "../components/DatasetList"; import ProgressIndicator from "../components/ProgressIndicator"; @@ -34,7 +34,7 @@ function Datasets(props) { return (
- {/* */} + }>