From 0215b40f7311441e7420b05ad600e40efc83559c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A5rek=20Andreassen?= Date: Sat, 2 Mar 2024 18:13:33 +0100 Subject: [PATCH] refactor: Export default and use same name as file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim HÄrek Andreassen --- components/SeriesCard.tsx | 2 +- routes/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/SeriesCard.tsx b/components/SeriesCard.tsx index 779186c..e12bd24 100644 --- a/components/SeriesCard.tsx +++ b/components/SeriesCard.tsx @@ -1,7 +1,7 @@ import { SearchResult } from "../lib/nrk.ts"; import CopyButton from "../islands/CopyButton.tsx"; -export function SerieCard(props: { serie: SearchResult; origin: string }) { +export default function SeriesCard(props: { serie: SearchResult; origin: string }) { const feedUrl = new URL(`/api/feeds/${props.serie.seriesId}`, props.origin); const image = props.serie.images[0]; return ( diff --git a/routes/index.tsx b/routes/index.tsx index 1521d06..cb16eb0 100644 --- a/routes/index.tsx +++ b/routes/index.tsx @@ -1,7 +1,7 @@ import { Head } from "$fresh/runtime.ts"; import { Handlers, PageProps } from "$fresh/server.ts"; import Search from "../components/Search.tsx"; -import { SerieCard } from "../components/SeriesCard.tsx"; +import SeriesCard from "../components/SeriesCard.tsx"; import { nrkRadio, SearchResult, SearchResultList, Serie } from "../lib/nrk.ts"; interface HandlerData { @@ -38,7 +38,7 @@ export default function Home({ data }: PageProps) { ? (
{data.result.map((result) => ( -