--- import { Image } from 'astro:assets'; import type { FindItem } from '../lib/find-items'; import { findHero } from '../lib/find-hero'; import SourceBadge from './SourceBadge.astro'; interface Props { item: FindItem; inList?: boolean; capturedAt?: Date; availableTags?: string[]; } const { item, inList, capturedAt, availableTags = [] } = Astro.props; const hero = findHero(item.id); const showInListAttr = import.meta.env.DEV && inList !== undefined; const selectedTags: string[] = item.data.editorialTags ?? []; const selectedSet = new Set(selectedTags); const fmtCaptured = new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit', }); function host(url: string) { try { return new URL(url).hostname.replace(/^www\./, ''); } catch { return url; } } ---
{import.meta.env.DEV && ( )} {hero && ( {item.data.name} )}
{item.data.subtitle &&

{item.data.subtitle}

}

{host(item.data.link)}

{capturedAt && capturedAt.valueOf() > 0 && (

)} {import.meta.env.DEV && (
{selectedTags.length > 0 && ( )}
{availableTags.map((tag) => ( ))}
)}