diff --git a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx index 68c87625b3..973add22fb 100644 --- a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx +++ b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx @@ -173,7 +173,8 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment // // Handle delete action // }; - const handleCopyLink = async () => { + const handleCopyLink = async (e: React.MouseEvent) => { + e.stopPropagation(); if (object?.url) { await navigator.clipboard.writeText(object.url); setIsCopied(true); @@ -195,7 +196,9 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment menuItems.push({ id: 'copy-link', label: 'Copy link to post', - onClick: handleCopyLink + onClick: (e: React.MouseEvent) => { + handleCopyLink(e); + } }); // TODO: If this is your own Note/Article, you should be able to delete it diff --git a/apps/admin-x-design-system/src/global/Menu.tsx b/apps/admin-x-design-system/src/global/Menu.tsx index 9047d74209..a45c87757f 100644 --- a/apps/admin-x-design-system/src/global/Menu.tsx +++ b/apps/admin-x-design-system/src/global/Menu.tsx @@ -6,7 +6,7 @@ export type MenuItem = { id: string, label: string; destructive?: boolean; - onClick?: () => void + onClick?: (e: React.MouseEvent) => void } export interface MenuProps { @@ -31,7 +31,11 @@ const Menu: React.FC = ({
{items.map(item => ( - + ))}