feat: add post like

This commit is contained in:
gosangam
2026-06-09 16:34:10 +05:30
parent e36afdd1a5
commit 647a803b96
8 changed files with 441 additions and 266 deletions
+29
View File
@@ -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)}
/>
);
}