* Bump eslint-config-preact from 1.1.3 to 1.1.4 Bumps [eslint-config-preact](https://github.com/preactjs/eslint-config-preact) from 1.1.3 to 1.1.4. - [Release notes](https://github.com/preactjs/eslint-config-preact/releases) - [Commits](https://github.com/preactjs/eslint-config-preact/compare/v1.1.3...v1.1.4) Signed-off-by: dependabot[bot] <support@github.com> * Add missing key prop for elements in iterators where necessary Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
30 lines
790 B
JavaScript
30 lines
790 B
JavaScript
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
|
|
export const PodcastFeed = ({ podcastItems }) => {
|
|
const podcastItemDivs = podcastItems.map((ep) => (
|
|
<a
|
|
key={ep.podcast.id}
|
|
className="individual-podcast-link"
|
|
href={`/${ep.podcast.slug}/${ep.slug}`}
|
|
>
|
|
<img src={ep.podcast.image_90} alt={ep.podcast.title} />
|
|
<div className="individual-podcast-link-details">
|
|
<strong>{ep.title}</strong>
|
|
{ep.podcast.title}
|
|
</div>
|
|
</a>
|
|
));
|
|
return (
|
|
<div className="single-article single-article-podcast-div">
|
|
<h3>
|
|
<a href="/pod">Today's Podcasts</a>
|
|
</h3>
|
|
{podcastItemDivs}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
PodcastFeed.propTypes = {
|
|
podcastItems: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
};
|