30 lines
617 B
TypeScript
30 lines
617 B
TypeScript
"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)}
|
|
/>
|
|
);
|
|
}
|