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

Add external links to const. #2252

Merged
merged 3 commits into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/custom/pages/Claim/CanUserClaimMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ClaimCommonTypes } from './types'
import { useClaimState, useClaimTimeInfo } from 'state/claim/hooks'
import { ClaimStatus } from 'state/claim/actions'
import { formatDateWithTimezone } from 'utils/time'
import { COW_LINKS } from 'pages/Claim/index'

type ClaimIntroductionProps = Pick<ClaimCommonTypes, 'hasClaims' | 'handleChangeAccount'> & {
isAirdropOnly: boolean
Expand All @@ -27,7 +28,7 @@ export default function CanUserClaimMessage({ hasClaims, isAirdropOnly, handleCh
Thank you for being a supporter of CowSwap and the CoW protocol. As an important member of the CowSwap
Community you may claim vCOW to be used for voting and governance. You can claim your tokens until{' '}
<i>{formatDateWithTimezone(airdropDeadline)}</i>
<ExternalLink href="https://cow.fi/">Read more about vCOW</ExternalLink>
<ExternalLink href={COW_LINKS.vCowPost}>Read more about vCOW</ExternalLink>
</Trans>
</p>
</IntroDescription>
Expand All @@ -42,7 +43,7 @@ export default function CanUserClaimMessage({ hasClaims, isAirdropOnly, handleCh
<ButtonSecondary onClick={handleChangeAccount} padding="0">
Try another account
</ButtonSecondary>{' '}
or <ExternalLink href="https://cow.fi/">read more about vCOW</ExternalLink>
or <ExternalLink href={COW_LINKS.vCowPost}>read more about vCOW</ExternalLink>
</Trans>
</IntroDescription>
)
Expand Down
10 changes: 4 additions & 6 deletions src/custom/pages/Claim/InvestmentFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { useActiveWeb3React } from 'hooks/web3'

import InvestOption from './InvestOption'
import { ClaimCommonTypes, ClaimWithInvestmentData, EnhancedUserClaimData } from '../types'
import { COW_LINKS } from 'pages/Claim'
import { ExternalLink } from 'theme'

const STEPS_DATA = [
{
Expand Down Expand Up @@ -177,13 +179,9 @@ export default function InvestmentFlow({ hasClaims, isAirdropOnly, ...tokenAppro
<br />
<br />
For more details around the token, please read{' '}
<a href="https://cow.fi" target="_blank" rel="noreferrer">
the blog post
</a>
<ExternalLink href={COW_LINKS.vCowPost}>the blog post</ExternalLink>
.<br /> For more details about the claiming process, please read the{' '}
<a href="https://cow.fi" target="_blank" rel="noreferrer">
step by step guide
</a>
<ExternalLink href={COW_LINKS.stepGuide}>step by step guide</ExternalLink>
</p>
)}

Expand Down
12 changes: 9 additions & 3 deletions src/custom/pages/Claim/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ import FooterNavButtons from './FooterNavButtons'
const GNO_CLAIM_APPROVE_MESSAGE = 'Approving GNO for investing in vCOW'
const USDC_CLAIM_APPROVE_MESSAGE = 'Approving USDC for investing in vCOW'

/* TODO: Replace URLs with the actual final URL destinations */
export const COW_LINKS = {
fairlighteth marked this conversation as resolved.
Show resolved Hide resolved
vCowPost: 'https://cow.fi/',
stepGuide: 'https://cow.fi/',
}

export default function Claim() {
const { account, chainId } = useActiveWeb3React()

Expand Down Expand Up @@ -82,7 +88,7 @@ export default function Claim() {
// get user claim data
const userClaimData = useUserEnhancedClaimData(activeClaimAccount)

// get total unclaimed ammount
// get total unclaimed amount
const unclaimedAmount = useUserUnclaimedAmount(activeClaimAccount)

const hasClaims = useMemo(() => userClaimData.length > 0, [userClaimData])
Expand Down Expand Up @@ -137,7 +143,7 @@ export default function Claim() {
console.log('Starting claiming with', inputData)
sendTransaction(inputData)
} else if (investFlowStep == 2) {
// Free claimings + selected investment oportunities
// Free claims + selected investment opportunities
const investClaims = prepareInvestClaims(investFlowData, userClaimData)
inputData.push(...investClaims)
console.log('Starting claiming with', inputData)
Expand Down Expand Up @@ -214,7 +220,7 @@ export default function Claim() {
handleChangeAccount={handleChangeAccount}
/>

{/* Try claiming or inform succesfull claim */}
{/* Try claiming or inform successful claim */}
<ClaimingStatus />
{/* IS Airdrop + investing (advanced) */}
<ClaimsTable isAirdropOnly={isAirdropOnly} hasClaims={hasClaims} />
Expand Down