From 8ed4cddb63d1f373d4cfbafaced50673794f495f Mon Sep 17 00:00:00 2001 From: onkar Date: Fri, 17 Jan 2025 20:25:40 +0530 Subject: [PATCH] Fix media link redundancy issue on podcast page by removing duplicate video player link --- website/src/components/featurePodcast.js | 27 +++++++++--------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/website/src/components/featurePodcast.js b/website/src/components/featurePodcast.js index f9bcba6..18cc0a3 100644 --- a/website/src/components/featurePodcast.js +++ b/website/src/components/featurePodcast.js @@ -7,33 +7,26 @@ import SpotifyCompact from '../components/spotifyCompact'; import VideoPlayer from '../components/videoPlayer'; export default function FeaturePodcast(props) { - - var defined = function(property){ + var defined = function(property) { return typeof property !== 'undefined'; }; - if(!props.featured){ - return; + if (!props.featured) { + return null; } return (

{props.title}

- {props.type === "soundcloud" && - - } - {props.type === "spotify" && - - } - {props.type === "video" && - - } - {defined(props.podcastUrl) && props.podcastUrl !== '' && + {props.type === "soundcloud" && } + {props.type === "spotify" && } + {props.type === "video" && } + {props.type !== "video" && defined(props.podcastUrl) && props.podcastUrl !== '' && ( {props.podcast} - } - {defined(props.description) && props.description !== '' && + )} + {defined(props.description) && props.description !== '' && (

{props.description}

- } + )}
); };