Files
zoo/app/components/ConnectWalletButton.tsx
2026-04-01 15:53:20 -07:00

40 lines
1.0 KiB
TypeScript

import { ConnectButton } from '@rainbow-me/rainbowkit'
import Box from 'components/primitives/Box'
import Button from 'components/primitives/Button'
import { FC } from 'react'
type Props = {}
export const ConnectWalletButton: FC<Props> = () => {
return (
<ConnectButton.Custom>
{({ account, chain, openConnectModal, mounted }) => {
return (
<Box
style={{
flex: '1',
display: 'flex',
justifyContent: 'flex',
}}
>
{(() => {
if (!mounted || !account || !chain) {
return (
<Button
css={{ flex: 1, justifyContent: 'center' }}
corners="rounded"
onClick={openConnectModal}
type="button"
>
Connect Wallet
</Button>
)
}
})()}
</Box>
)
}}
</ConnectButton.Custom>
)
}