Skip to content

Commit

Permalink
Refs #268585 - Update data providers list widget to use new serializer.
Browse files Browse the repository at this point in the history
  • Loading branch information
GhitaB committed May 10, 2024
1 parent d7c0960 commit 489c87e
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions src/components/theme/Widgets/DataProviderListWidget.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
function DataProviderListWidget(props) {
const { value } = props;

/*
Example of data providers list:
[{
"acronym": "AAA",
"countries": [
{
"code": "IT",
"name": "Italy"
}
],
"id": 1,
"is_network": false,
"link": "https://test.test/1/",
"members": [],
"name": "Aaaa AAAaa AAAAA"
}, ...]
*/

return (
<ul>
{value.map((item, index) => (
<li key={index}>
<a href="https://insitu.copernicus.eu/">{item.title}</a>
</li>
))}
</ul>
<div className="data-providers">
<h4>Data providers</h4>
<ul>
{value.map((item, index) => (
<li key={index}>
<a href={item.link}>{item.name}</a>
</li>
))}
</ul>
</div>
);
}

Expand Down

0 comments on commit 489c87e

Please sign in to comment.