diff --git a/src/pages/podcast.tsx b/src/pages/podcast.tsx index 09db938..5ba8f3a 100644 --- a/src/pages/podcast.tsx +++ b/src/pages/podcast.tsx @@ -5,7 +5,7 @@ import { PodcastInfoCard } from "../components/podcast-info-card"; export function Podcast() { const { podcastId } = useParams<{ podcastId: string }>(); - const { data: podcast } = usePodcastQuery(podcastId); + const { data: podcast, isLoading } = usePodcastQuery(podcastId); if (!podcastId) { throw new Error( @@ -13,6 +13,10 @@ export function Podcast() { ); } + if (isLoading) { + return null; + } + if (!podcast) { return

Podcast not found

; }