Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Add link to the profile (#2269)
Browse files Browse the repository at this point in the history
* Add link to the profile

* Update link

* Fix code style issues with Prettier

Co-authored-by: Lint Action <[email protected]>
  • Loading branch information
anxolin and lint-action authored Jan 24, 2022
1 parent 71ecc44 commit bdb4403
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
18 changes: 16 additions & 2 deletions src/custom/pages/Claim/ClaimingStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import { useActiveWeb3React } from 'hooks/web3'
import CowProtocolLogo from 'components/CowProtocolLogo'
import { useAllClaimingTransactions } from 'state/enhancedTransactions/hooks'
import { useMemo } from 'react'
import { Link } from 'react-router-dom'
import { ExplorerLink } from 'components/ExplorerLink'
import { EnhancedTransactionLink } from 'components/EnhancedTransactionLink'
import { ExplorerDataType } from 'utils/getExplorerLink'

export default function ClaimingStatus() {
const { chainId } = useActiveWeb3React()
const { chainId, account } = useActiveWeb3React()
const { activeClaimAccount, claimStatus, claimedAmount } = useClaimState()

const allClaimTxs = useAllClaimingTransactions()
Expand All @@ -22,8 +25,9 @@ export default function ClaimingStatus() {
const isConfirmed = claimStatus === ClaimStatus.CONFIRMED
const isAttempting = claimStatus === ClaimStatus.ATTEMPTING
const isSubmitted = claimStatus === ClaimStatus.SUBMITTED
const isSelfClaiming = account === activeClaimAccount

if (!activeClaimAccount || claimStatus === ClaimStatus.DEFAULT) return null
if (!account || !activeClaimAccount || claimStatus === ClaimStatus.DEFAULT) return null

return (
<ConfirmOrLoadingWrapper activeBG={true}>
Expand Down Expand Up @@ -56,6 +60,16 @@ export default function ClaimingStatus() {
🐄🎉
</span>
</Trans>
{isSelfClaiming ? (
<Trans>
You can see your vCOW balance in the <Link to="/profile">Profile</Link>
</Trans>
) : (
<Trans>
You have just claimed on behalf of{' '}
<ExplorerLink id={activeClaimAccount} type={ExplorerDataType.ADDRESS} />
</Trans>
)}
</>
)}
{isAttempting && (
Expand Down
8 changes: 4 additions & 4 deletions src/custom/pages/Claim/InvestmentFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export type InvestOptionProps = {
claim: EnhancedUserClaimData
optionIndex: number
approveData:
| { approveState: ApprovalState; approveCallback: (optionalParams?: OptionalApproveCallbackParams) => void }
| undefined
| { approveState: ApprovalState; approveCallback: (optionalParams?: OptionalApproveCallbackParams) => void }
| undefined
}

type InvestmentFlowProps = Pick<ClaimCommonTypes, 'hasClaims'> & {
Expand Down Expand Up @@ -198,8 +198,8 @@ export default function InvestmentFlow({ hasClaims, isAirdropOnly, ...tokenAppro
{investFlowStep === 0
? 'Claim and invest'
: investFlowStep === 1
? 'Set allowance to Buy vCOW'
: 'Confirm transaction to claim all vCOW'}
? 'Set allowance to Buy vCOW'
: 'Confirm transaction to claim all vCOW'}
</h1>

{investFlowStep === 0 && (
Expand Down

0 comments on commit bdb4403

Please sign in to comment.