Browse Source

feat: 投稿リスト一覧の作り変更(#134) (#135)

Merge branch 'main' into feature/134

#134 細部

#134

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: https://git.miteruzo.com/miteruzo/btrc-hub/pulls/135
pull/137/head
みてるぞ 2 weeks ago
parent
commit
6d82e38d56
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      frontend/src/components/PostList.tsx

+ 3
- 4
frontend/src/components/PostList.tsx View File

@@ -12,15 +12,14 @@ export default (({ posts, onClick }: Props) => (
<div className="flex flex-wrap gap-6 p-4">
{posts.map ((post, i) => (
<Link to={`/posts/${ post.id }`}
key={i}
key={post.id}
className="w-40 h-40 overflow-hidden rounded-lg shadow-md hover:shadow-lg"
onClick={onClick}>
<img src={post.thumbnail || post.thumbnailBase || undefined}
alt={post.title || post.url}
title={post.title || post.url || undefined}
loading="eager"
fetchPriority="high"
loading={i < 12 ? 'eager' : 'lazy'}
decoding="async"
className="object-none w-full h-full" />
className="object-cover w-full h-full"/>
</Link>))}
</div>)) satisfies FC<Props>

Loading…
Cancel
Save