--- import type { ComponentProps } from 'react' import { Picture } from 'astro:assets' import defaultServiceImage from '../assets/fallback-service-image.jpg' import { cn } from '../lib/cn' const fallbackImages = { service: defaultServiceImage, } as const satisfies Record type Props = Omit, 'src'> & { src: ComponentProps['src'] | null | undefined fallback?: keyof typeof fallbackImages } const { src, formats = ['avif', 'webp'], fallback = undefined as keyof typeof fallbackImages | undefined, height, width, pictureAttributes, ...props } = Astro.props const fallbackImage = fallback ? fallbackImages[fallback] : undefined --- {/* eslint-disable @typescript-eslint/no-explicit-any */} { !!(src ?? fallbackImage) && ( ) }