This commit is contained in:
2025-08-23 18:40:03 +09:00
parent e79688783e
commit 7e2d94fdc0
15 changed files with 80 additions and 57 deletions
+4 -3
View File
@@ -1,13 +1,14 @@
import { Link } from 'react-router-dom'
import type { MouseEvent } from 'react'
import type { FC, MouseEvent } from 'react'
import type { Post } from '@/types'
type Props = { posts: Post[]
onClick?: (event: MouseEvent<HTMLElement>) => void }
export default ({ posts, onClick }: Props) => (
export default (({ posts, onClick }: Props) => (
<div className="flex flex-wrap gap-6 p-4">
{posts.map ((post, i) => (
<Link to={`/posts/${ post.id }`}
@@ -22,4 +23,4 @@ export default ({ posts, onClick }: Props) => (
decoding="async"
className="object-none w-full h-full" />
</Link>))}
</div>)
</div>)) satisfies FC<Props>