diff --git a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx index 5467305ca2..a4ca3ab154 100644 --- a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx +++ b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx @@ -28,7 +28,7 @@ const ButtonAddToAllocate: FC = ({ const [isTooltipClicked, setIsTooltipClicked] = useState(false); const [isTooltipVisible, setIsTooltipVisible] = useState(false); const tooltipText = useMemo(() => { - if (isArchivedProject) { + if (isArchivedProject && isAllocatedTo) { return t('donated'); } if (isAddedToAllocate && isTooltipClicked) { @@ -42,7 +42,7 @@ const ButtonAddToAllocate: FC = ({ } return t('saveToAllocate'); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isAddedToAllocate, isTooltipClicked, isArchivedProject]); + }, [isAddedToAllocate, isTooltipClicked, isArchivedProject, isAllocatedTo]); const handleTooltipVisibilityChange = (isVisible: boolean) => { setIsTooltipVisible(isVisible); @@ -64,7 +64,7 @@ const ButtonAddToAllocate: FC = ({ Icon={ { if (isTooltipVisible) { setIsTooltipClicked(true);