diff --git a/src/webapp/features/collections/components/collectionActions/CollectionActions.tsx b/src/webapp/features/collections/components/collectionActions/CollectionActions.tsx index 3df1f0d1..11dfde03 100644 --- a/src/webapp/features/collections/components/collectionActions/CollectionActions.tsx +++ b/src/webapp/features/collections/components/collectionActions/CollectionActions.tsx @@ -1,8 +1,9 @@ -import { Menu, ActionIcon } from '@mantine/core'; -import { Fragment, useState } from 'react'; -import { BsThreeDots, BsPencilFill, BsTrash2Fill } from 'react-icons/bs'; +import { Group, Menu, ActionIcon, CopyButton, Button } from '@mantine/core'; import EditCollectionDrawer from '../editCollectionDrawer/EditCollectionDrawer'; import DeleteCollectionModal from '../deleteCollectionModal/DeleteCollectionModal'; +import { BsThreeDots, BsPencilFill, BsTrash2Fill } from 'react-icons/bs'; +import { MdIosShare } from 'react-icons/md'; +import { useState } from 'react'; import { useAuth } from '@/hooks/useAuth'; interface Props { @@ -19,35 +20,48 @@ export default function CollectionActions(props: Props) { const [showDeleteModal, setShowDeleteModal] = useState(false); const isAuthor = user?.handle === props.authorHandle; + const shareLink = `${window.location.origin}/profile/${props.authorHandle}/collections/${props.rkey}`; return ( - - - - - - - - - {isAuthor && ( - - setShowEditDrawer(true)} - leftSection={} - > - Edit collection - - } - onClick={() => setShowDeleteModal(true)} - > - Delete collection - - - )} - - + + + {({ copied, copy }) => ( + + )} + + {isAuthor && ( + + + + + + + + setShowEditDrawer(true)} + leftSection={} + > + Edit collection + + } + onClick={() => setShowDeleteModal(true)} + > + Delete collection + + + + )} + setShowEditDrawer(false)} @@ -63,6 +77,6 @@ export default function CollectionActions(props: Props) { onClose={() => setShowDeleteModal(false)} collectionId={props.id} /> - + ); }