refactor: reformat PostCard component for improved readability and consistent styling.

This commit is contained in:
Christomatt
2026-01-26 15:04:37 +01:00
parent 38ddede873
commit 3ba60cadf5
+7 -1
View File
@@ -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>