diff --git a/frontend/src/components/Board/Card/PopoverSettings.tsx b/frontend/src/components/Board/Card/PopoverSettings.tsx index 6ec4fad6c..10a4d0791 100644 --- a/frontend/src/components/Board/Card/PopoverSettings.tsx +++ b/frontend/src/components/Board/Card/PopoverSettings.tsx @@ -127,6 +127,8 @@ const PopoverCardSettings: React.FC = React.memo( userId, hideCards, }) => { + const [openPopover, setOpenPopover] = useState(false); + const { removeFromMergeCard } = useCards(); const unmergeCard = () => { @@ -141,8 +143,15 @@ const PopoverCardSettings: React.FC = React.memo( }); }; + const handleOpenPopover = (value: boolean) => setOpenPopover(value); + + const handleDelete = () => { + setOpenPopover(false); + if (handleDeleteCard) handleDeleteCard(); + }; + return ( - + = React.memo( diff --git a/frontend/src/components/Board/Column/partials/OptionsMenu/index.tsx b/frontend/src/components/Board/Column/partials/OptionsMenu/index.tsx index 1e4e5af5d..288fab614 100644 --- a/frontend/src/components/Board/Column/partials/OptionsMenu/index.tsx +++ b/frontend/src/components/Board/Column/partials/OptionsMenu/index.tsx @@ -81,9 +81,11 @@ const OptionsMenu = ({ setOpenPopover(false); }; + const handleOpenPopover = (value: boolean) => setOpenPopover(value); + return ( <> - setOpenPopover(value)}> +