From 5e1cab4c498860f129ce5b3726baa4372491d70b Mon Sep 17 00:00:00 2001 From: Justin Walrath Date: Mon, 12 May 2025 09:17:05 -0400 Subject: [PATCH] Added a code workspace file. Feed should come back with the correct url. Styled the feed and site buttons. --- ever-givin-pod.code-workspace | 8 +++++ src/app/[stream]/podcasts/podcastSummary.tsx | 34 +++++++++++--------- src/common/helpers/data.ts | 12 ++----- 3 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 ever-givin-pod.code-workspace diff --git a/ever-givin-pod.code-workspace b/ever-givin-pod.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/ever-givin-pod.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/src/app/[stream]/podcasts/podcastSummary.tsx b/src/app/[stream]/podcasts/podcastSummary.tsx index 5855aa5..e3d3ed6 100644 --- a/src/app/[stream]/podcasts/podcastSummary.tsx +++ b/src/app/[stream]/podcasts/podcastSummary.tsx @@ -3,13 +3,21 @@ import Image from 'next/image'; import { StreamDto } from '../../../common/dtos/streamDto'; import { useEffect, useState } from 'react'; +import { useRouter } from 'next/navigation'; type PodcastSummaryType = { stream?: string | string[]; }; export default function PodcastSummary({ stream }: PodcastSummaryType) { - const [summaryData, setSummaryData] = useState(); + + const [summaryData, setSummaryData] = useState(), + router = useRouter(), + handleNavigation = (url?: string) => { + if (url) { + router.push(url); + } + }; useEffect(() => { fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/api/${stream}`) @@ -50,23 +58,19 @@ export default function PodcastSummary({ stream }: PodcastSummaryType) { -
- +
diff --git a/src/common/helpers/data.ts b/src/common/helpers/data.ts index 90bc8c0..b2ffbd3 100644 --- a/src/common/helpers/data.ts +++ b/src/common/helpers/data.ts @@ -42,16 +42,8 @@ export const prepareStreamItem = (stream?: StreamDto) => { const imageUrl = stream.imageUrl ? convertUrlToPublic(stream.imageUrl) : undefined; return { ...stream, - imageUrl//, - // customElements: [ - // { - // image: [ - // { url: imageUrl }, - // { title: stream.title }//, - // //{ link: stream.link } - // ] - // } - //] + imageUrl, + feedUrl: `${process.env.NEXT_PUBLIC_API_BASE_URL}/api/${stream.id}/feed`, }; };