Orcasa-Platform / orcasa

A Horizon Europe project to restore soil earth
https://orcasa-client.vercel.app
MIT License
2 stars 0 forks source link

[Datasets] Implement the list #93

Closed clementprdhomme closed 11 months ago

clementprdhomme commented 11 months ago

This PR implements the list of the datasets module.

Considerations

API

The format of some keys is not consistent. This is the case of:

I will ask Fabrice if he can make these changes in the API.

Design

The design of the module hasn't been yet reviewed by Lidia and it is not yet consistent with the other modules. For this reason, I only implemented the list and using the cards from the Network module.

There will probably be further changes to the list:

I will add all these comments on the Jira story.

Acceptance criteria

Tracking

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
orcasa-client βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 28, 2023 10:33am
Bluesmile82 commented 11 months ago

I can't see any DOI link. I guess we still don't have them on the API. Could you add the pointer cursor to the button? After that feel free to merge πŸ‘

clementprdhomme commented 11 months ago

@Bluesmile82 You can see datasets with DOI by changing the params of the useGetDatasetsInfinite hook in src/app/(modules)/datasets/page.tsx:

diff --git a/client/src/app/(modules)/datasets/page.tsx b/client/src/app/(modules)/datasets/page.tsx
index 29b762d..fb62a83 100644
--- a/client/src/app/(modules)/datasets/page.tsx
+++ b/client/src/app/(modules)/datasets/page.tsx
@@ -2,13 +2,15 @@

 import Image from 'next/image';

+import { DatasetSource } from '@/types/datasets';
+
 import { useGetDatasetsInfinite } from '@/hooks/datasets';

 import { sourceToLogo } from './dataset';
 import DatasetList from './dataset-list';

 export default function DatasetsModule() {
-  const query = useGetDatasetsInfinite({ size: 20 });
+  const query = useGetDatasetsInfinite({ size: 20, source: DatasetSource.Inrae });