diff --git a/src/components/InterventionsListItem.tsx b/src/components/InterventionsListItem.tsx index ba768eb1..3bebcd48 100644 --- a/src/components/InterventionsListItem.tsx +++ b/src/components/InterventionsListItem.tsx @@ -28,7 +28,7 @@ const InterventionsListItem: React.FC = ({
{image && ( diff --git a/src/components/Tag.tsx b/src/components/Tag.tsx index 6e65325c..362b2e7d 100644 --- a/src/components/Tag.tsx +++ b/src/components/Tag.tsx @@ -1,11 +1,15 @@ import React from "react"; -const Tag = ({ title }: { title: string }) => { - return ( +interface Props { + title: string; +} + +const Tag: React.FC = ({ title }) => { + return title ? ( {title} - ); + ) : null; }; export default Tag; diff --git a/src/util/ContentTransformer.ts b/src/util/ContentTransformer.ts index 5c2b9eab..892106b5 100644 --- a/src/util/ContentTransformer.ts +++ b/src/util/ContentTransformer.ts @@ -84,7 +84,7 @@ export function trimAndSortInterventions( ? rawSortedInterventionsContentWithoutIndex.slice(0, count) : rawSortedInterventionsContentWithoutIndex; - return trimmedInterventions; + return trimmedInterventions.filter(Boolean); } export function transformInterventionsToPoiData(