import { PlayIcon } from "@heroicons/react/24/solid"; import type { Tag } from "@prisma/client"; import { Link } from "@remix-run/react"; import { ListenLink } from "~/components/page-layout"; import type { StationWithTagsClientSide } from "~/models/station.server"; import type { Channel } from "~/routes/listen.channel.$channel"; import type { ConvertDatesToStrings } from "~/utils"; export type StationsGalleryProps = { stations: StationWithTagsClientSide[]; tag?: ConvertDatesToStrings; channel?: ConvertDatesToStrings; }; export function StationsGallery({ stations, tag, channel }: StationsGalleryProps) { function getStationUrl(id: string): string { if (channel) { return `/listen/channel/${channel.slug}?station=${id}`; } if (tag) { return `/listen/tag/${tag?.slug}?station=${id}`; } return `/listen?station=${id}`; } return (
{stations.map((station) => { return (
Radio Station

{station.name}

{station.tags.map((t, id) => { return {t.tag.name}; })}

{station.description}

Listen Now
); })}
); }