diff --git a/components/SeriesCard.tsx b/components/SeriesCard.tsx index 0dae82e..50ed1b9 100644 --- a/components/SeriesCard.tsx +++ b/components/SeriesCard.tsx @@ -7,7 +7,7 @@ export default function SeriesCard(props: { serie: SearchResult; origin: string return (
-

{props.serie.title}

+

{props.serie.title}

{props.serie.description}

{feedUrl.toString()} diff --git a/routes/index.tsx b/routes/index.tsx index 024dd56..1d04993 100644 --- a/routes/index.tsx +++ b/routes/index.tsx @@ -46,18 +46,7 @@ export default function Home({ data }: PageProps) {
- {data.result - ? ( -
- {data.result.map((result) => ( - - ))} -
- ) - : null} +
) { ); } + +function SearchResult({ result, origin }: { result: SearchResultList; origin: string }) { + if (!result) { + return null; + } + if (result.length === 0) { + return

Ingen resultater

; + } + return ( +
+

Søkeresultat: {result.length} treff

+ {result.map((result) => ( + + ))} +
+ ); +}