Skip to content

Commit 6b30c7a

Browse files
authored
Removed "Copy link" action of feed items (#22470)
closes AP-889 - Currently all links of a feed item in ActivityPub results in a 404 which is not an expected behavior. As for now links to feed items is not a requirement we're removing the copy link function for feed items.
1 parent 06eba21 commit 6b30c7a

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

apps/admin-x-activitypub/src/components/feed/FeedItem.tsx

-7
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,6 @@ const FeedItem: React.FC<FeedItemProps> = ({
385385
onCommentClick={onCommentClick}
386386
onLikeClick={onLikeClick}
387387
/>
388-
<FeedItemMenu
389-
allowDelete={allowDelete}
390-
layout='modal'
391-
trigger={UserMenuTrigger}
392-
onCopyLink={handleCopyLink}
393-
onDelete={handleDelete}
394-
/>
395388
</div>
396389
</div>
397390
</div>

apps/admin-x-activitypub/src/components/feed/FeedItemMenu.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ const FeedItemMenu: React.FC<FeedItemMenuProps> = ({
4949
</PopoverTrigger>
5050
<PopoverContent align={`${layout === 'modal' ? 'start' : 'end'}`} alignOffset={layout === 'modal' ? -12 : 0} className='p-2'>
5151
<div className='flex w-48 flex-col'>
52-
<PopoverClose asChild>
53-
<Button className='justify-start' variant='ghost' onClick={handleCopyLinkClick}>
54-
Copy link
55-
</Button>
56-
</PopoverClose>
52+
{(!allowDelete || layout === 'inbox') &&
53+
<PopoverClose asChild>
54+
<Button className='justify-start' variant='ghost' onClick={handleCopyLinkClick}>
55+
Copy link
56+
</Button>
57+
</PopoverClose>
58+
}
5759
{allowDelete &&
5860
<AlertDialogTrigger asChild>
5961
<PopoverClose asChild>

0 commit comments

Comments
 (0)