diff --git a/app/soapbox/features/ui/components/modals/manage-group-modal/steps/confirmation-step.tsx b/app/soapbox/features/ui/components/modals/manage-group-modal/steps/confirmation-step.tsx index 158b68ffd..1b71e36c9 100644 --- a/app/soapbox/features/ui/components/modals/manage-group-modal/steps/confirmation-step.tsx +++ b/app/soapbox/features/ui/components/modals/manage-group-modal/steps/confirmation-step.tsx @@ -1,13 +1,28 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Avatar, Divider, HStack, Stack, Text } from 'soapbox/components/ui'; +import { Avatar, Divider, HStack, Stack, Text, Button } from 'soapbox/components/ui'; interface IConfirmationStep { group: any } const ConfirmationStep: React.FC = ({ group }) => { + const handleCopyLink = () => { + if (navigator.clipboard) { + navigator.clipboard.writeText(group.uri); + } + }; + + const handleShare = () => { + navigator.share({ + text: group.display_name, + url: group.uri, + }).catch((e) => { + if (e.name !== 'AbortError') console.error(e); + }); + }; + return ( @@ -59,6 +74,18 @@ const ConfirmationStep: React.FC = ({ group }) => { + + + {('share' in navigator) && ( + + )} + + + ); };