Skip to content

Commit

Permalink
Merge pull request #415 from dappforce/menu
Browse files Browse the repository at this point in the history
Add copy owner address for space dropdown menu
  • Loading branch information
olehmell committed Apr 25, 2024
2 parents 6b12284 + 1ca7a71 commit 55cf173
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/spaces/helpers/SpaceDropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -142,6 +142,16 @@ export const SpaceDropdownMenu = (props: SpaceDropDownProps) => {
Copy Space Id: {id}
</span>
</Menu.Item>
<Menu.Item key={`copy-owner-address-${spaceKey}`}>
<span
onClick={() => {
navigator.clipboard.writeText(ownerId)
showSuccessMessage('Owner Address copied to clipboard')
}}
>
Copy Owner Address
</span>
</Menu.Item>
</>
)
}
Expand Down

0 comments on commit 55cf173

Please sign in to comment.