refactor: remove hardcoded route path

This commit is contained in:
Hossein Mehrabi 2023-09-01 18:33:50 +03:30
parent 45d8704bfa
commit 98ecc1517d
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import styled from '@emotion/styled'
import Image from 'next/image'
import Link from 'next/link'
import { LPE } from '../../types/lpe.types'
import { getPostLink } from '../../utils/route.utils'
import { Grid, GridItem } from '../Grid/Grid'
import PodcastHost from './Podcast.Host'
@ -18,7 +19,10 @@ export default function PodcastsLists({ shows }: Props) {
const isEven = idx % 2 === 0
return (
<ShowCardContainer key={show.id} className="w-8">
<ShowCard isEven={isEven} href={`/podcasts/${show.slug}`}>
<ShowCard
isEven={isEven}
href={getPostLink('podcast', { showSlug: show.slug })}
>
<div>
<Top>
<ShowInfoContainer>