Upgrade Fresh and add a bunch of small QOL improvements #16
|
|
@ -1,7 +1,7 @@
|
||||||
import { SearchResult } from "../lib/nrk.ts";
|
import { SearchResult } from "../lib/nrk.ts";
|
||||||
import CopyButton from "../islands/CopyButton.tsx";
|
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 feedUrl = new URL(`/api/feeds/${props.serie.seriesId}`, props.origin);
|
||||||
const image = props.serie.images[0];
|
const image = props.serie.images[0];
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { Head } from "$fresh/runtime.ts";
|
import { Head } from "$fresh/runtime.ts";
|
||||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||||
import Search from "../components/Search.tsx";
|
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";
|
import { nrkRadio, SearchResult, SearchResultList, Serie } from "../lib/nrk.ts";
|
||||||
|
|
||||||
interface HandlerData {
|
interface HandlerData {
|
||||||
|
|
@ -38,7 +38,7 @@ export default function Home({ data }: PageProps<HandlerData>) {
|
||||||
? (
|
? (
|
||||||
<div className="w-full mx-auto my-4">
|
<div className="w-full mx-auto my-4">
|
||||||
{data.result.map((result) => (
|
{data.result.map((result) => (
|
||||||
<SerieCard
|
<SeriesCard
|
||||||
serie={result}
|
serie={result}
|
||||||
origin={data.origin}
|
origin={data.origin}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue