From d79bedf219e5a6fddfb0510e0cb8dcf5e9f55613 Mon Sep 17 00:00:00 2001 From: pluja Date: Thu, 22 May 2025 19:43:20 +0000 Subject: [PATCH] Release 2025-05-22-5X5Q --- .../components/ServicesSearchResults.astro | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/web/src/components/ServicesSearchResults.astro b/web/src/components/ServicesSearchResults.astro index a1ef4e0..d4314c7 100644 --- a/web/src/components/ServicesSearchResults.astro +++ b/web/src/components/ServicesSearchResults.astro @@ -38,8 +38,12 @@ const { const hasScams = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing filters.verification.includes('VERIFICATION_FAILED') || includeScams +const hasSomeScam = !!services?.some((service) => service.verificationStatus.includes('VERIFICATION_FAILED')) const hasCommunityContributed = filters.verification.includes('COMMUNITY_CONTRIBUTED') +const hasSomeCommunityContributed = !!services?.some((service) => + service.verificationStatus.includes('COMMUNITY_CONTRIBUTED') +) const totalPages = Math.ceil(total / pageSize) || 1 --- @@ -63,29 +67,36 @@ const totalPages = Math.ceil(total / pageSize) || 1 { hasScams && hasCommunityContributed && ( -
- - - Showing SCAM and unverified community-contributed services. - {includeScams && 'Because there is a text query.'} +
+ + + Results {hasSomeScam || hasSomeCommunityContributed ? 'include' : 'may include'} SCAMS or + community-contributed services.
) } { hasScams && !hasCommunityContributed && ( -
- - {includeScams ? 'Showing SCAM services because there is a text query.' : 'Showing SCAM services!'} +
+ + Results {hasSomeScam ? 'include' : 'may include'} SCAM services
) } { !hasScams && hasCommunityContributed && ( -
- - Showing unverified community-contributed services, some might be scams. +
+ + Results {hasSomeCommunityContributed ? 'include' : 'may include'} unverified community-contributed + services, some might be scams.
) }