Posts
Some checks failed
Lint / lint (push) Failing after 9s

This commit is contained in:
Julien Valverdé
2025-01-14 22:11:13 +01:00
parent 4f091ae221
commit 18d94c77e2
11 changed files with 104 additions and 24 deletions

View File

@@ -0,0 +1,25 @@
import { Chunk } from "effect"
import { VPost } from "../post/VPost"
import { Reffuse } from "./reffuse"
import { PostsState } from "./services"
export function VPosts() {
const state = Reffuse.useMemo(PostsState.PostsState)
const [posts] = Reffuse.useRefState(state.posts)
return (
<div className="flex-col gap-2 items-stretch">
{Chunk.map(posts, (post, index) => (
<VPost
key={`${ index }-${ post.id }`}
index={index}
post={post}
/>
))}
</div>
)
}