diff --git a/app/components/station-player.tsx b/app/components/station-player.tsx index 36f8f32..9334708 100644 --- a/app/components/station-player.tsx +++ b/app/components/station-player.tsx @@ -46,7 +46,7 @@ export function StationPlayer({ station, nextPrevStationIds }: StationPlayerProp } }; importComponent() - }, [station]) + }, [station, nextPrevStationIds, route]) if (!station || !player) { return <>>; diff --git a/app/components/stations-gallery.tsx b/app/components/stations-gallery.tsx index dcbe0c9..8e86b50 100644 --- a/app/components/stations-gallery.tsx +++ b/app/components/stations-gallery.tsx @@ -1,6 +1,6 @@ -import { PlayIcon } from "@heroicons/react/24/solid"; +import { PlayIcon, SpeakerWaveIcon } from "@heroicons/react/24/solid"; import type { Tag } from "@prisma/client"; -import { Link } from "@remix-run/react"; +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"; @@ -11,6 +11,8 @@ export type StationsGalleryProps = { }; export function StationsGallery({ stations, tag }: StationsGalleryProps) { + const location = useLocation(); + const currentStationId = new URLSearchParams(location.search).get('station')?.trim() return (