Skip to content

Commit

Permalink
Merge pull request #27 from lum-network/hotfix/lum-801
Browse files Browse the repository at this point in the history
[LUM-801] Add tooltip on claim and compound button when is disabled
  • Loading branch information
ThibaultJRD authored Aug 16, 2023
2 parents b071f23 + 1f0d3d5 commit 16b254a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ export default {
},
],
claimAndCompound: 'CLAIM & COMPOUND',
claimAndCompoundHint: "You can't compound your prizes if you have less than the minimum deposit.",
claimMyPrizes: 'Claim My Prizes',
drawId: 'Draw #{{ drawId }}',
shareTitle: 'Spread the word!',
Expand Down
35 changes: 17 additions & 18 deletions src/pages/MySavings/components/Modals/Claim/Claim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,24 +350,23 @@ const Claim = ({ prizes, prices, pools }: Props) => {
</span>
{I18n.t('deposit.feesWarning')}
</Card>
{!blockedCompound && (
<>
<Button
type='button'
onClick={() => {
onClaim(true);
}}
className='w-100'
disabled={isLoading}
loading={isLoading}
>
<img src={Assets.images.yellowStar} alt='Star' className='me-3' />
{I18n.t('mySavings.claimModal.claimAndCompound')}
<img src={Assets.images.yellowStar} alt='Star' className='ms-3' />
</Button>
<hr />
</>
)}
<span data-tooltip-id='claim-and-compound-hint' data-tooltip-html={I18n.t('mySavings.claimModal.claimAndCompoundHint')} className='ms-2 mb-2'>
<Button
type='button'
onClick={() => {
onClaim(true);
}}
className='w-100'
disabled={isLoading || blockedCompound}
loading={isLoading}
>
<img src={Assets.images.yellowStar} alt='Star' className='me-3' />
{I18n.t('mySavings.claimModal.claimAndCompound')}
<img src={Assets.images.yellowStar} alt='Star' className='ms-3' />
</Button>
{blockedCompound ? <Tooltip id='claim-and-compound-hint' /> : null}
</span>
<hr />
<Button
type='button'
onClick={() => {
Expand Down

0 comments on commit 16b254a

Please sign in to comment.