--- import { Icon } from 'astro-icon/components' import { cn } from '../lib/cn' import { pluralize } from '../lib/pluralize' import { createPageUrl } from '../lib/urls' import Button from './Button.astro' import ServiceCard from './ServiceCard.astro' import type { ServicesFiltersObject } from '../pages/index.astro' import type { ComponentProps, HTMLAttributes } from 'astro/types' type Props = HTMLAttributes<'div'> & { hasDefaultFilters?: boolean services: ComponentProps['service'][] | undefined currentPage?: number total: number pageSize: number sortSeed?: string filters: ServicesFiltersObject includeScams: boolean } const { services, hasDefaultFilters = false, currentPage = 1, total, pageSize, sortSeed, class: className, filters, includeScams, ...divProps } = Astro.props const hasScams = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing filters.verification.includes('VERIFICATION_FAILED') || includeScams const hasCommunityContributed = filters.verification.includes('COMMUNITY_CONTRIBUTED') const totalPages = Math.ceil(total / pageSize) || 1 ---
{total.toLocaleString()} {pluralize('result', total)} Loading...
{ hasScams && hasCommunityContributed && (
Showing SCAM and unverified community-contributed services. {includeScams && 'Because there is a text query.'}
) } { hasScams && !hasCommunityContributed && (
{includeScams ? 'Showing SCAM services because there is a text query.' : 'Showing SCAM services!'}
) } { !hasScams && hasCommunityContributed && (
Showing unverified community-contributed services, some might be scams.
) } { !services || services.length === 0 ? (

No services found

Try adjusting your filters to find more services

Clear filters
) : ( <>
{services.map((service, i) => ( ))}
Loading more services...
) }