-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathfeaturePodcast.js
32 lines (29 loc) · 1.18 KB
/
featurePodcast.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import classnames from 'classnames';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from '../pages/styles.module.css';
import Soundcloud from '../components/soundcloud';
import SpotifyCompact from '../components/spotifyCompact';
import VideoPlayer from '../components/videoPlayer';
export default function FeaturePodcast(props) {
var defined = function(property) {
return typeof property !== 'undefined';
};
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} />}
{props.type !== "video" && defined(props.podcastUrl) && props.podcastUrl !== '' && (
<a href={props.podcastUrl}>{props.podcast}</a>
)}
{defined(props.description) && props.description !== '' && (
<p>{props.description}</p>
)}
</div>
);
};