import { Show } from "solid-js"; import type { SearchResult } from "@/types/source"; import { SourceBadge } from "./SourceBadge"; type ResultCardProps = { result: SearchResult; selected: boolean; onSelect: () => void; onSubscribe?: () => void; }; export function ResultCard(props: ResultCardProps) { const podcast = () => props.result.podcast; return ( {podcast().title} [Subscribed] by {podcast().author} {(description) => ( {description().length > 120 ? description().slice(0, 120) + "..." : description()} )} 0}> {(podcast().categories ?? []).slice(0, 3).map((category) => ( [{category}] ))} { event.stopPropagation?.(); props.onSubscribe?.(); }} > [+] Add to Feeds ); }