import { Show } from "solid-js" import { format } from "date-fns" import type { SearchResult } from "../types/source" import { SourceBadge } from "./SourceBadge" type ResultDetailProps = { result?: SearchResult onSubscribe?: (result: SearchResult) => void } export function ResultDetail(props: ResultDetailProps) { return ( Select a result to see details. } > {(result) => ( <> {result().podcast.title} by {result().podcast.author} {result().podcast.description} 0}> {(result().podcast.categories ?? []).map((category) => ( [{category}] ))} Feed: {result().podcast.feedUrl} Updated: {format(result().podcast.lastUpdated, "MMM d, yyyy")} props.onSubscribe?.(result())} > [+] Add to Feeds Already subscribed )} ) }