Skip to content

Commit

Permalink
Fix media link redundancy issue on podcast page by removing duplicate…
Browse files Browse the repository at this point in the history
… video player link
  • Loading branch information
ONKARBH committed Jan 17, 2025
1 parent 1f13a2b commit 8ed4cdd
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions website/src/components/featurePodcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className={classnames('text--center col col--4 padding')}>
<h3>{props.title}</h3>
{props.type === "soundcloud" &&
<Soundcloud scsrc={props.src} />
}
{props.type === "spotify" &&
<SpotifyCompact scsrc={props.src} />
}
{props.type === "video" &&
<VideoPlayer scsrc={props.src} />
}
{defined(props.podcastUrl) && props.podcastUrl !== '' &&
{props.type === "soundcloud" && <Soundcloud scsrc={props.src} />}
{props.type === "spotify" && <SpotifyCompact scsrc={props.src} />}
{props.type === "video" && <VideoPlayer scsrc={props.src} />}
{props.type !== "video" && defined(props.podcastUrl) && props.podcastUrl !== '' && (
<a href={props.podcastUrl}>{props.podcast}</a>
}
{defined(props.description) && props.description !== '' &&
)}
{defined(props.description) && props.description !== '' && (
<p>{props.description}</p>
}
)}
</div>
);
};

0 comments on commit 8ed4cdd

Please sign in to comment.