mirror of
https://github.com/ershisan99/podcaster.git
synced 2025-12-18 12:33:48 +00:00
feat: add link to episode page
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
usePodcastEpisodesQuery,
|
usePodcastEpisodesQuery,
|
||||||
useTopPodcastsQuery,
|
useTopPodcastsQuery,
|
||||||
@@ -48,10 +48,13 @@ export function Podcast() {
|
|||||||
{episodesData?.episodes?.map((episode) => {
|
{episodesData?.episodes?.map((episode) => {
|
||||||
const formattedDate = formatDate(episode.releaseDate);
|
const formattedDate = formatDate(episode.releaseDate);
|
||||||
const formattedDuration = formatDuration(episode.durationSeconds);
|
const formattedDuration = formatDuration(episode.durationSeconds);
|
||||||
|
const url = `/podcast/${podcastId}/episode/${episode.id}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr key={episode.id}>
|
<tr key={episode.id}>
|
||||||
<td>{episode.title}</td>
|
<td>
|
||||||
|
<Link to={url}>{episode.title}</Link>
|
||||||
|
</td>
|
||||||
<td>{formattedDate}</td>
|
<td>{formattedDate}</td>
|
||||||
<td>{formattedDuration}</td>
|
<td>{formattedDuration}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user