From 1ca7a718e3bc6e3cdd23fc2edf0f93b0f39c79ab Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Thu, 25 Apr 2024 20:52:22 +0700 Subject: [PATCH] Add copy owner address for space dropdown menu --- src/components/spaces/helpers/SpaceDropdownMenu.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/spaces/helpers/SpaceDropdownMenu.tsx b/src/components/spaces/helpers/SpaceDropdownMenu.tsx index a9505c747..cf808b9c1 100644 --- a/src/components/spaces/helpers/SpaceDropdownMenu.tsx +++ b/src/components/spaces/helpers/SpaceDropdownMenu.tsx @@ -30,7 +30,7 @@ export const SpaceDropdownMenu = (props: SpaceDropDownProps) => { spaceOwnerId, ...otherProps } = props - const { id } = struct + const { id, ownerId } = struct const spaceKey = `space-${id.toString()}` const canCreatePost = useHasUserASpacePermission({ space: struct, permission: 'CreatePosts' }) const isMySpace = useIsMySpace(struct) @@ -142,6 +142,16 @@ export const SpaceDropdownMenu = (props: SpaceDropDownProps) => { Copy Space Id: {id} + + { + navigator.clipboard.writeText(ownerId) + showSuccessMessage('Owner Address copied to clipboard') + }} + > + Copy Owner Address + + ) }