Skip to content

Commit 67d994f

Browse files
committed
show download count if it more than zero
1 parent 1478360 commit 67d994f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/[locale]/(user)/components/ListingComponent.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,17 @@ const ListingComponent: React.FC<ListingProps> = ({
488488
value: formatDate(item.modified),
489489
tooltip: 'Date',
490490
},
491-
{
491+
];
492+
493+
if (item.download_count > 0) {
494+
MetadataContent.push({
492495
icon: Icons.download,
493496
label: 'Download',
494497
value: item.download_count?.toString() || '0',
495498
tooltip: 'Download',
496-
},
497-
];
499+
});
500+
}
501+
498502
if (Geography) {
499503
MetadataContent.push({
500504
icon: Icons.globe,
@@ -513,7 +517,7 @@ const ListingComponent: React.FC<ListingProps> = ({
513517
});
514518
}
515519

516-
const FooterContent = [
520+
const FooterContent = [
517521
{
518522
icon: `/Sectors/${item.sectors?.[0]}.svg`,
519523
label: 'Sectors',

0 commit comments

Comments
 (0)