Skip to content

Commit e39d785

Browse files
authored
Merge pull request #1821 from IndexCoop/chore/refactor-chakra-image-link
chore: refactor chakra image/link
2 parents f6305ac + af26c24 commit e39d785

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

src/components/swap/components/select-token-modal.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
Image,
32
Modal,
43
ModalBody,
54
ModalCloseButton,
@@ -8,6 +7,7 @@ import {
87
ModalOverlay,
98
} from '@chakra-ui/react'
109
import clsx from 'clsx'
10+
import Image from 'next/image'
1111
import { useMemo } from 'react'
1212
import { arbitrum, base } from 'viem/chains'
1313

@@ -121,19 +121,18 @@ const TokenItem = ({
121121
<div className='flex items-center'>
122122
<div className='relative inline-block h-11 w-11'>
123123
<Image
124-
className='h-10 w-10'
125124
alt={`${item.symbol} logo`}
126125
src={item.image}
127-
w='40px'
128-
h='40px'
126+
width={40}
127+
height={40}
129128
/>
130129
{networkAsset && (
131130
<div className='bg-ic-gray-100 absolute bottom-0 right-0 h-5 w-5 rounded-full'>
132131
<Image
133132
alt={`${item.symbol} logo`}
134133
src={networkAsset}
135-
w='20px'
136-
h='20px'
134+
width={20}
135+
height={20}
137136
/>
138137
</div>
139138
)}

src/components/swap/components/warning.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flex, Link, Text } from '@chakra-ui/react'
1+
import { Flex, Text } from '@chakra-ui/react'
22
import { ExclamationCircleIcon } from '@heroicons/react/20/solid'
33
import { ReactNode } from 'react'
44

@@ -31,19 +31,21 @@ const warningsData: Record<
3131
<>
3232
Some of our tokens are not available to Restricted Persons - including
3333
US persons - as defined in our{' '}
34-
<Link
34+
<a
3535
href='https://indexcoop.com/terms-of-service'
36-
style={{ textDecoration: 'underline' }}
36+
className='underline'
37+
target='_blank'
3738
>
3839
Terms of Service
39-
</Link>
40+
</a>
4041
. Please also see our{' '}
41-
<Link
42+
<a
4243
href='https://indexcoop.com/tokens-restricted-for-restricted-persons'
43-
style={{ textDecoration: 'underline' }}
44+
className='underline'
45+
target='_blank'
4446
>
4547
Tokens Restricted for Restricted Persons
46-
</Link>{' '}
48+
</a>{' '}
4749
page.
4850
</>
4951
),
@@ -55,19 +57,21 @@ const warningsData: Record<
5557
It appears you may be using a VPN and, because some of our tokens are
5658
not available to Restricted Persons - including US persons - as defined
5759
in our{' '}
58-
<Link
60+
<a
5961
href='https://indexcoop.com/terms-of-service'
60-
style={{ textDecoration: 'underline' }}
62+
className='underline'
63+
target='_blank'
6164
>
6265
Terms of Service
63-
</Link>
66+
</a>
6467
, we are required to restrict access to VPN users. Please also see our{' '}
65-
<Link
68+
<a
6669
href='https://indexcoop.com/tokens-restricted-for-restricted-persons'
67-
style={{ textDecoration: 'underline' }}
70+
className='underline'
71+
target='_blank'
6872
>
6973
Tokens Restricted for Restricted Persons
70-
</Link>{' '}
74+
</a>{' '}
7175
page.
7276
</>
7377
),
@@ -121,17 +125,13 @@ export const WarningCompProtection = () => {
121125
textColor={colors.ic.gray[600]}
122126
>
123127
It is highly recommended to use an MEV protected RPC.{' '}
124-
<Link onClick={onClick} style={{ textDecoration: 'underline' }}>
128+
<span onClick={onClick} className='cursor-pointer underline'>
125129
Click here
126-
</Link>{' '}
130+
</span>{' '}
127131
to add the MEV Blocker network to your wallet.{' '}
128-
<Link
129-
href='https://mevblocker.io/'
130-
isExternal
131-
style={{ textDecoration: 'underline' }}
132-
>
132+
<a href='https://mevblocker.io/' target='_blank' className='underline'>
133133
Learn More about MEV protection
134-
</Link>
134+
</a>
135135
</Text>
136136
</Flex>
137137
)

0 commit comments

Comments
 (0)