import { PlayIcon, SpeakerWaveIcon } from "@heroicons/react/24/solid"; import type { Tag } from "@prisma/client"; import { Link, useLocation } from "@remix-run/react"; import { ListenLink } from "~/components/page-layout"; import type { StationWithTagsClientSide } from "~/models/station.server"; import { getStationUrl, type ConvertDatesToStrings } from "~/utils"; export type StationsGalleryProps = { stations: StationWithTagsClientSide[]; tag?: ConvertDatesToStrings; }; export function StationsGallery({ stations, tag }: StationsGalleryProps) { const location = useLocation(); const currentStationId = new URLSearchParams(location.search).get('station')?.trim() return (
{stations.map((station) => { return (
Radio Station

{station.name}

{station.id === currentStationId ?
: null}

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

{station.description}

Listen Now
); })}
); }