Use collection config for slugs and correct locale for links
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { Post } from 'types/payload-types'
|
||||
import Image from 'next/image'
|
||||
import { COLLECTION_SLUG_POST } from '@/app/(payload)/collections/config'
|
||||
|
||||
interface Props {
|
||||
post: Post
|
||||
@ -9,7 +10,10 @@ export default function PostEntry(props: Props) {
|
||||
if (typeof props.post.thumbnail === 'string') return
|
||||
|
||||
return (
|
||||
<a className="py-4 border-secondary decoration-transparent" href={`/posts/${props.post.slug}`}>
|
||||
<a
|
||||
className="py-4 border-secondary decoration-transparent"
|
||||
href={`/${COLLECTION_SLUG_POST}${props.post.path}`}
|
||||
>
|
||||
<article className="flex px-5 py-3 gap-8">
|
||||
<Image
|
||||
src={props.post.thumbnail.url || ''}
|
||||
|
Reference in New Issue
Block a user