File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed
Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -7,26 +7,31 @@ export default function Features() {
77 const { clientConfig } = useFCL ( )
88 const featuresListKeys = FEATURES_LIST . map ( f => f . name )
99 const suggestedFeatures = clientConfig ?. discoveryFeaturesSuggested ?. filter ( f => featuresListKeys . includes ( f ) ) || [ ]
10+ const hasSuggestedFeatures = suggestedFeatures . length > 0
1011
1112 return (
1213 < Box mb = { 5 } >
13- < HStack mb = { 3 } >
14- < Text fontSize = 'sm' as = 'b' > Wallet Requirements</ Text >
15- < IconButton
16- isRound = { true }
17- variant = 'solid'
18- colorScheme = 'teal'
19- aria-label = 'Done'
20- fontSize = 'sm'
21- size = { 'xs' }
22- icon = { < CheckIcon /> }
23- />
24- </ HStack >
25- < HStack >
26- { suggestedFeatures . map ( ( suggestion , index ) => (
27- < Tag key = { index } size = 'sm' > { suggestion } </ Tag >
28- ) ) }
29- </ HStack >
14+ { hasSuggestedFeatures &&
15+ < >
16+ < HStack mb = { 3 } >
17+ < Text fontSize = 'sm' as = 'b' > Wallet Requirements</ Text >
18+ < IconButton
19+ isRound = { true }
20+ variant = 'solid'
21+ colorScheme = 'teal'
22+ aria-label = 'Done'
23+ fontSize = 'sm'
24+ size = { 'xs' }
25+ icon = { < CheckIcon /> }
26+ />
27+ </ HStack >
28+ < HStack >
29+ { suggestedFeatures . map ( ( suggestion , index ) => (
30+ < Tag key = { index } size = 'sm' > { suggestion } </ Tag >
31+ ) ) }
32+ </ HStack >
33+ </ >
34+ }
3035 </ Box >
3136 )
3237}
Original file line number Diff line number Diff line change @@ -82,11 +82,11 @@ export default function ServiceCard({
8282 window . location . href = `${ service . endpoint } ${ window . location . search } `
8383 }
8484 }
85-
85+
8686 const hasSuggestedFeatures = useMemo ( ( ) => {
87+ if ( suggestedFeatures . length === 0 ) return false
8788 return suggestedFeatures . every ( feature => supportedFeatures . includes ( feature ) )
8889 } , [ suggestedFeatures , supportedFeatures ] )
89-
9090
9191 const openMoreInfo = e => {
9292 e . stopPropagation ( )
You can’t perform that action at this time.
0 commit comments