From 53a9fedca109df63bb822eb64fbf020847c134e9 Mon Sep 17 00:00:00 2001 From: Luke Bunselmeyer Date: Mon, 8 May 2023 14:50:18 -0400 Subject: [PATCH] Minor refactoring to breakup large components into smaller ones. --- app/components/stations-gallery.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/components/stations-gallery.tsx b/app/components/stations-gallery.tsx index 344ae9b..0d3739d 100644 --- a/app/components/stations-gallery.tsx +++ b/app/components/stations-gallery.tsx @@ -3,21 +3,16 @@ 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) { +export function StationsGallery({ stations, tag }: StationsGalleryProps) { function getStationUrl(id: string): string { - if (channel) { - return `/listen/channel/${channel.slug}?station=${id}`; - } if (tag) { return `/listen/tag/${tag?.slug}?station=${id}`; }