From 93deffacc027a155456c570bafe6f2de01f2aeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Miko=C5=82ajczyk?= Date: Wed, 20 Mar 2024 16:00:48 +0100 Subject: [PATCH] oct-1484: cr fixes --- .../shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);