Skip to content

Commit

Permalink
Merge branch 'master' into release/v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Mar 25, 2024
2 parents 3c5187b + 870bb4d commit 5b1e4b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const ButtonAddToAllocate: FC<ButtonAddToAllocateProps> = ({
const [isTooltipClicked, setIsTooltipClicked] = useState(false);
const [isTooltipVisible, setIsTooltipVisible] = useState(false);
const tooltipText = useMemo(() => {
if (isArchivedProject && isAllocatedTo) {
return t('donated');
}
if (isAddedToAllocate && isTooltipClicked) {
return t('saved');
}
Expand All @@ -39,7 +42,7 @@ const ButtonAddToAllocate: FC<ButtonAddToAllocateProps> = ({
}
return t('saveToAllocate');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isAddedToAllocate, isTooltipClicked]);
}, [isAddedToAllocate, isTooltipClicked, isArchivedProject, isAllocatedTo]);

const handleTooltipVisibilityChange = (isVisible: boolean) => {
setIsTooltipVisible(isVisible);
Expand All @@ -61,7 +64,7 @@ const ButtonAddToAllocate: FC<ButtonAddToAllocateProps> = ({
Icon={
<Tooltip
hideAfterClick
isDisabled={isArchivedProject || isPatronMode}
isDisabled={isPatronMode || (isArchivedProject && !isAddedToAllocate)}
onClickCallback={() => {
if (isTooltipVisible) {
setIsTooltipClicked(true);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ui/InputText/InputText.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
font-size: $font-size-18;

&.hasSuffix {
padding: 0 5.2rem 0 2.8rem;
padding: 0 5.5rem 0 2.8rem;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"saveToAllocate": "Save to allocate",
"saved": "Saved",
"removeFromAllocate": "Remove from allocate",
"removed": "Removed"
"removed": "Removed",
"donated": "Donated"
},
"rewardsCalculator": {
"enterGLMAmount": "Enter a GLM amount",
Expand Down

0 comments on commit 5b1e4b6

Please sign in to comment.