refactor: reformat PostCard component for improved readability and consistent styling.
This commit is contained in:
@@ -659,7 +659,13 @@ export function PostCard({ post, onLike, onRepost, onComment, onDelete, onHide,
|
||||
<FlagIcon />
|
||||
<span>{reporting ? '...' : ''}</span>
|
||||
</button>
|
||||
{(currentUser?.id === post.author.id || (post.bot && currentUser?.id === post.bot.ownerId) || (parentPostAuthorId && currentUser?.id === parentPostAuthorId)) && (
|
||||
{(currentUser && (
|
||||
currentUser.id === post.author.id ||
|
||||
(post.bot && currentUser.id === post.bot.ownerId) ||
|
||||
(parentPostAuthorId && currentUser.id === parentPostAuthorId) ||
|
||||
// Allow deleting own remote posts (where ID format differs but handle matches)
|
||||
(post.author.id.startsWith('swarm:') && post.author.handle === currentUser.handle)
|
||||
)) && (
|
||||
<button className="post-action delete-action" onClick={handleDelete} disabled={deleting} title="Delete post">
|
||||
<TrashIcon />
|
||||
<span>{deleting ? '...' : ''}</span>
|
||||
|
||||
Reference in New Issue
Block a user