-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathWalletSection.tsx
More file actions
47 lines (42 loc) · 1.31 KB
/
WalletSection.tsx
File metadata and controls
47 lines (42 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { useAccount, useConnections } from 'wagmi'
import { Box, Button, Card, Typography, WalletSVG } from '@ensdomains/thorin'
import RecordItem from '@app/components/RecordItem'
import { hasParaConnection } from '@app/utils/utils'
export const WalletSection = () => {
const { address, connector } = useAccount()
const connections = useConnections()
const isParaConnected = hasParaConnection(connections)
return (
<Card>
<Typography
display="flex"
fontVariant="headingFour"
justifyContent="space-between"
alignItems="center"
>
Wallet{' '}
</Typography>
<RecordItem type="address" itemKey="Address" value={address as string} />
<Box
display="flex"
flexDirection={{ base: 'column', sm: 'row' }}
justifyContent="space-between"
gap="2"
>
<RecordItem type="text" itemKey="Connector" value={connector?.name as string} />
{isParaConnected && (
<Button
width={{ base: 'full', sm: 'max' }}
size="small"
colorStyle="accentSecondary"
prefix={() => <WalletSVG height={12} width={12} />}
as="a"
href="https://connect.getpara.com/"
>
Go to wallet
</Button>
)}
</Box>
</Card>
)
}