feat: add post like
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* PostLikesDrawer — the "liked by" list for a post. A thin wrapper over the
|
||||
* generic virtualized UserListDrawer, wired to the post-likes endpoint.
|
||||
*/
|
||||
|
||||
import { posts } from "@/lib/social";
|
||||
import { UserListDrawer } from "@/components/social/user-list-drawer";
|
||||
|
||||
export function PostLikesDrawer({
|
||||
open,
|
||||
postId,
|
||||
onClose,
|
||||
}: {
|
||||
open: boolean;
|
||||
postId: string;
|
||||
onClose: () => void;
|
||||
}) {
|
||||
return (
|
||||
<UserListDrawer
|
||||
open={open}
|
||||
onClose={onClose}
|
||||
title="Likes"
|
||||
depsKey={`likes:${postId}`}
|
||||
fetchPage={(params) => posts.likers(postId, params)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user