2026-03-08 16:30:02 +08:00
|
|
|
import type { Comment } from '@bitsocialhq/bitsocial-react-hooks';
|
2025-12-05 17:38:17 +01:00
|
|
|
|
|
|
|
|
export type PostMenuProps = {
|
|
|
|
|
cid?: string;
|
|
|
|
|
postCid?: string;
|
|
|
|
|
parentCid?: string;
|
|
|
|
|
subplebbitAddress?: string;
|
|
|
|
|
authorAddress?: string;
|
|
|
|
|
link?: string;
|
|
|
|
|
linkWidth?: number;
|
|
|
|
|
linkHeight?: number;
|
|
|
|
|
thumbnailUrl?: string;
|
|
|
|
|
deleted?: boolean;
|
|
|
|
|
removed?: boolean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const selectPostMenuProps = (post?: Comment): PostMenuProps => ({
|
|
|
|
|
cid: post?.cid,
|
|
|
|
|
postCid: post?.postCid,
|
|
|
|
|
parentCid: post?.parentCid,
|
|
|
|
|
subplebbitAddress: post?.subplebbitAddress,
|
|
|
|
|
authorAddress: post?.author?.address,
|
|
|
|
|
link: post?.link,
|
|
|
|
|
linkWidth: post?.linkWidth,
|
|
|
|
|
linkHeight: post?.linkHeight,
|
|
|
|
|
thumbnailUrl: post?.thumbnailUrl,
|
|
|
|
|
deleted: post?.deleted,
|
|
|
|
|
removed: post?.removed,
|
|
|
|
|
});
|