Show episode number.
This commit is contained in:
@@ -112,7 +112,7 @@ export default async function Page({ params }) {
|
|||||||
<PlayButtonClient audioPlayerData={audioPlayerData} size="large" />
|
<PlayButtonClient audioPlayerData={audioPlayerData} size="large" />
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<h1 className="mt-2 text-4xl font-bold text-slate-900">
|
<h1 className="mt-2 text-4xl font-bold text-slate-900">
|
||||||
{episode.title}
|
[{episode.num}] {episode.title}
|
||||||
</h1>
|
</h1>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
date={date}
|
date={date}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function EpisodeEntry({ episode }) {
|
|||||||
id={`episode-${episode.id}-title`}
|
id={`episode-${episode.id}-title`}
|
||||||
className="mt-2 text-lg font-bold text-slate-900"
|
className="mt-2 text-lg font-bold text-slate-900"
|
||||||
>
|
>
|
||||||
<Link href={`/podcast/${episode?.slug}`}>{episode.title}</Link>
|
<Link href={`/podcast/${episode?.slug}`}>[{episode.num}] {episode.title}</Link>
|
||||||
</h2>
|
</h2>
|
||||||
<FormattedDate
|
<FormattedDate
|
||||||
date={date}
|
date={date}
|
||||||
@@ -75,7 +75,7 @@ function EpisodeEntry({ episode }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function Episodes({ limit }) {
|
export default async function Episodes({ limit }) {
|
||||||
const episodes = await getEpisodes()
|
const episodes = await getEpisodes();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -190,8 +190,10 @@ export async function getEpisodes() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const numEpisodes = feed.entries.length;
|
||||||
return feed.entries.map(
|
return feed.entries.map(
|
||||||
({ id, title, description, enclosure , published, content, chapters }) => ({
|
({ id, title, description, enclosure , published, content, chapters }, i) => ({
|
||||||
|
num: numEpisodes - i,
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
published,
|
published,
|
||||||
|
|||||||
Reference in New Issue
Block a user