diff --git a/components/Features.tsx b/components/Features.tsx index 99f6da66..4a137c98 100644 --- a/components/Features.tsx +++ b/components/Features.tsx @@ -7,26 +7,31 @@ export default function Features() { const { clientConfig } = useFCL() const featuresListKeys = FEATURES_LIST.map(f => f.name) const suggestedFeatures = clientConfig?.discoveryFeaturesSuggested?.filter(f => featuresListKeys.includes(f)) || [] + const hasSuggestedFeatures = suggestedFeatures.length > 0 return ( - - Wallet Requirements - } - /> - - - {suggestedFeatures.map((suggestion, index) => ( - {suggestion} - ))} - + {hasSuggestedFeatures && + <> + + Wallet Requirements + } + /> + + + {suggestedFeatures.map((suggestion, index) => ( + {suggestion} + ))} + + + } ) } \ No newline at end of file diff --git a/components/ServiceCard.tsx b/components/ServiceCard.tsx index e4b46202..5492badf 100644 --- a/components/ServiceCard.tsx +++ b/components/ServiceCard.tsx @@ -82,11 +82,11 @@ export default function ServiceCard({ window.location.href = `${service.endpoint}${window.location.search}` } } - + const hasSuggestedFeatures = useMemo(() => { + if (suggestedFeatures.length === 0) return false return suggestedFeatures.every(feature => supportedFeatures.includes(feature)) }, [suggestedFeatures, supportedFeatures]) - const openMoreInfo = e => { e.stopPropagation()