Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Mar 24, 2024
1 parent a240bad commit 1da054b
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import getConfig from 'next/config'
import FilledButton from '../button/filled'
import { shorten } from '@/utils'
import CopyToClipboard from 'react-copy-to-clipboard'
import { Snippet } from '@nextui-org/react'
export function Header() {
const [open, setOpen] = useState(false)
const { disconnect, account } = useContext(Context)
Expand Down Expand Up @@ -44,29 +45,14 @@ export function Header() {
<div className='font-semibold'>Address</div>
<div className='flex justify-between items-center'>
<div>{shorten(address, 8, 8)}</div>
<CopyToClipboard text={address}>
<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'>
<g clipPath='url(#clip0_2132_5264)'>
<path
d='M13.3333 6H7.33333C6.59695 6 6 6.59695 6 7.33333V13.3333C6 14.0697 6.59695 14.6667 7.33333 14.6667H13.3333C14.0697 14.6667 14.6667 14.0697 14.6667 13.3333V7.33333C14.6667 6.59695 14.0697 6 13.3333 6Z'
stroke='white'
strokeLinecap='round'
strokeLinejoin='round'
/>
<path
d='M3.33337 10H2.66671C2.31309 10 1.97395 9.85956 1.7239 9.60952C1.47385 9.35947 1.33337 9.02033 1.33337 8.66671V2.66671C1.33337 2.31309 1.47385 1.97395 1.7239 1.7239C1.97395 1.47385 2.31309 1.33337 2.66671 1.33337H8.66671C9.02033 1.33337 9.35947 1.47385 9.60952 1.7239C9.85956 1.97395 10 2.31309 10 2.66671V3.33337'
stroke='white'
strokeLinecap='round'
strokeLinejoin='round'
/>
</g>
<defs>
<clipPath id='clip0_2132_5264'>
<rect width='16' height='16' fill='white' />
</clipPath>
</defs>
</svg>
</CopyToClipboard>
<Snippet
classNames={{
base: 'bg-[transparent] text-[#fff] p-0',
pre: 'hidden',
copyButton: 'h-5',
}}>
{address}
</Snippet>
</div>
</div>
)}
Expand Down

0 comments on commit 1da054b

Please sign in to comment.