Skip to content

Commit

Permalink
Fix: Donate Translations (#318)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Marques <[email protected]>
  • Loading branch information
hugomarquesdev and Hugo Marques authored May 31, 2023
1 parent 04465fe commit 7f25174
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/slices/Pact/Donate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { toast } from '../../components/Toaster/Toaster';
import { useEpoch, useMerkleDistributor, useRewards } from '@impact-market/utils';
import { useWallet } from '../../hooks/useWallet';
import React, { useCallback, useEffect, useState } from 'react';
import RichText from '../../lib/Prismic/components/RichText';
import axios from 'axios';
import config from '../../../config';
import styled, { css } from 'styled-components';
Expand Down Expand Up @@ -121,7 +122,12 @@ const AirgrabContent = (props: {
return toast.error(toastMessagesClaimError);
}

return toast.success(toastMessagesClaimSuccess);
return toast.success(
<RichText
content={toastMessagesClaimSuccess}
variables={{ amount: currencyValue(amountToClaim, { isToken: true }) }}
/>
);
} catch (error) {
handleKnownErrors(error, toastMessagesClaimError);
setAirgrabClaimIsLoading(false);
Expand Down Expand Up @@ -231,7 +237,12 @@ const Rewards = (props: { onUpdate: Function; translations: any }) => {
return toast.error(toastMessagesClaimError);
}

return toast.success(toastMessagesClaimSuccess);
return toast.success(
<RichText
content={toastMessagesClaimSuccess}
variables={{ amount: currencyValue(rewards?.claimable, { isToken: true }) }}
/>
);
} catch (error) {
handleKnownErrors(error, toastMessagesClaimError);
setClaimIsLoading(false);
Expand Down Expand Up @@ -294,9 +305,7 @@ const Rewards = (props: { onUpdate: Function; translations: any }) => {
{!rewards?.claimable && !rewards?.estimated && (
<Highlight mt={1}>
<HighlightRow>
<Text div sColor={colors.g500} small>
{donateNocontributionrewardtobeclaimed[0]?.text}
</Text>
<RichText content={donateNocontributionrewardtobeclaimed} div sColor={colors.g500} small />
<TextLink
brandPrimary
ml={{ md: 'unset', xs: 'auto' }}
Expand Down

1 comment on commit 7f25174

@vercel
Copy link

@vercel vercel bot commented on 7f25174 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./

web-git-production-ipct.vercel.app
web-ipct.vercel.app
www.impactmarket.com
impactmarket.com

Please sign in to comment.