Skip to content

Commit 2981c5f

Browse files
authored
Merge pull request #1322 from peanutprotocol/add-button-deposit-usdc-screen
[TASK-15759] Add `I did it` button on deposit USDC screen
2 parents 87de14f + 60dbc73 commit 2981c5f

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

src/components/AddMoney/views/CryptoDepositQR.view.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use client'
22
import { Button } from '@/components/0_Bruddle/Button'
33
import Card from '@/components/Global/Card'
4+
import CopyToClipboard from '@/components/Global/CopyToClipboard'
45
import NavHeader from '@/components/Global/NavHeader'
56
import QRCodeWrapper from '@/components/Global/QRCodeWrapper'
67
import AvatarWithBadge from '@/components/Profile/AvatarWithBadge'
7-
import { copyTextToClipboardWithFallback } from '@/utils'
88
import Image, { StaticImageData } from 'next/image'
9-
import { useCallback, useState } from 'react'
9+
import { useRouter } from 'next/navigation'
1010

1111
interface CryptoDepositQRProps {
1212
tokenName: string
@@ -25,14 +25,7 @@ export const CryptoDepositQR = ({
2525
tokenIcon,
2626
chainIcon,
2727
}: CryptoDepositQRProps) => {
28-
const [copied, setCopied] = useState(false)
29-
30-
const handleCopyAddress = useCallback(() => {
31-
copyTextToClipboardWithFallback(depositAddress)
32-
setCopied(true)
33-
const timer = setTimeout(() => setCopied(false), 2000)
34-
return () => clearTimeout(timer)
35-
}, [depositAddress])
28+
const router = useRouter()
3629

3730
return (
3831
<div className="flex w-full flex-col justify-start space-y-8 pb-5 md:pb-0">
@@ -64,15 +57,18 @@ export const CryptoDepositQR = ({
6457
<label htmlFor="deposit-address" className="text-sm font-bold text-black">
6558
Your deposit address
6659
</label>
67-
<Card className="px-4 py-3 text-xs text-grey-1">{depositAddress}</Card>
60+
<Card className="flex items-center justify-between px-4 py-3 text-xs text-grey-1">
61+
<p className="text-xs md:text-sm md:font-semibold">{depositAddress}</p>
62+
63+
<CopyToClipboard textToCopy={depositAddress} className="text-black" iconSize={'4'} />
64+
</Card>
6865
<Button
6966
variant="purple"
70-
onClick={handleCopyAddress}
71-
className="w-full"
72-
icon={copied ? 'check' : 'copy'}
67+
onClick={() => router.push('/home')}
68+
className="mt-4 w-full"
7369
shadowSize="4"
7470
>
75-
{copied ? 'Copied!' : 'Copy'}
71+
I did it!
7672
</Button>
7773
</div>
7874
</div>

src/components/Claim/Link/views/BankFlowManager.view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ export const BankFlowManager = (props: IClaimScreenProps) => {
448448
<CountryListRouter
449449
flow="claim"
450450
claimLinkData={claimLinkData}
451-
inputTitle="Which country do you want to receive to?"
451+
inputTitle="Select your bank account's country"
452452
/>
453453
)
454454
case ClaimBankFlowStep.BankDetailsForm:

0 commit comments

Comments
 (0)