From 52680277fc7bc806f40d1c39dcb088b1f3efca2c Mon Sep 17 00:00:00 2001 From: dougfabris Date: Thu, 1 Aug 2024 15:26:07 -0300 Subject: [PATCH] fix: marketplace `TagList` render --- .../components/CategoryFilter/TagList.tsx | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/meteor/client/views/marketplace/components/CategoryFilter/TagList.tsx b/apps/meteor/client/views/marketplace/components/CategoryFilter/TagList.tsx index ec5fb13f0fab..3cba9e81b357 100644 --- a/apps/meteor/client/views/marketplace/components/CategoryFilter/TagList.tsx +++ b/apps/meteor/client/views/marketplace/components/CategoryFilter/TagList.tsx @@ -8,14 +8,20 @@ type TagListProps = { onClick: CategoryDropDownListProps['onSelected']; }; -const TagList = ({ categories, onClick }: TagListProps) => ( - - {categories.map((category) => ( - onClick(category)} disabled={undefined} mbe={8}> - {category.label} - - ))} - -); +const TagList = ({ categories, onClick }: TagListProps) => { + if (!categories.length) { + return null; + } + + return ( + + {categories.map((category) => ( + onClick(category)}> + {category.label} + + ))} + + ); +}; export default TagList;