This commit is contained in:
2025-07-26 05:37:20 +09:00
parent de9bba5609
commit 2f3acc7584
3 changed files with 82 additions and 23 deletions
+22
View File
@@ -0,0 +1,22 @@
import { Link } from 'react-router-dom'
import type { Post } from '@/types'
type Props = { posts: Post[] }
export default ({ posts }: Props) => (
<div className="flex flex-wrap gap-6 p-4">
{posts.map ((post, i) => (
<Link to={`/posts/${ post.id }`}
key={i}
className="w-40 h-40 overflow-hidden rounded-lg shadow-md hover:shadow-lg">
<img src={post.thumbnail || post.thumbnailBase || undefined}
alt={post.title || post.url}
title={post.title || post.url || undefined}
loading="eager"
fetchPriority="high"
decoding="async"
className="object-none w-full h-full" />
</Link>))}
</div>)