Skip to content

Commit

Permalink
show available formats on listing
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Nov 22, 2022
1 parent cf7ab67 commit 0ee2f6b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/Result/DatahubCardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import { UniversalCard } from '@eeacms/volto-listing-block';

const DatahubCardItem = (props) => {
const { result } = props;
const { topic } = result._result || [];
const { topic, dataset_formats } = result._result || [];

// let metaType = result.metaTypes || '';
// if (metaType.length === 0) {
// metaType = 'Others';
// }

const item = {
title: (
<Link
Expand Down Expand Up @@ -43,10 +42,12 @@ const DatahubCardItem = (props) => {
<StringList value={topic.raw} />
</div>
) : null}
<div className="result-info">
<span className="result-info-title">Available formats: </span>
[Icons]
</div>
{dataset_formats ? (
<div className="result-info">
<span className="result-info-title">Available formats: </span>
<StringList value={dataset_formats.raw} />
</div>
) : null}
</div>
),
};
Expand Down

0 comments on commit 0ee2f6b

Please sign in to comment.