/** * PodcastCard component - Reusable card for displaying podcast info */ import { Show, For } from "solid-js" import type { Podcast } from "../types/podcast" type PodcastCardProps = { podcast: Podcast selected: boolean compact?: boolean onSelect?: () => void onSubscribe?: () => void } export function PodcastCard(props: PodcastCardProps) { const handleSubscribeClick = () => { props.onSubscribe?.() } return ( {/* Title Row */} {props.podcast.title} [+] {/* Author */} by {props.podcast.author} {/* Description */} {props.podcast.description!.length > 80 ? props.podcast.description!.slice(0, 80) + "..." : props.podcast.description} {/* Categories and Subscribe Button */} 0}> {(cat) => [{cat}]} {props.podcast.isSubscribed ? "[Unsubscribe]" : "[Subscribe]"} ) }