Skip to content

Commit

Permalink
Merge pull request #27 from kaneki003/main
Browse files Browse the repository at this point in the history
Added disconnection functionality
  • Loading branch information
ceilican authored Jan 7, 2025
2 parents 38e70c2 + cb2f97d commit a093c76
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
12 changes: 6 additions & 6 deletions web/src/components/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const ConnectWallet = () => {
return (
<div>
{address ? (
<div>
<Button
onClick={disconnect}
className="custom-button"
>
<div className="md:flex gap-x-4">
<Button className="mb-2 md:mb-0">
{address.slice(0, 6)}...{address.slice(-4)}
</Button>
</div>
<Button onClick={disconnect} className="mb-2 md:mb-0">
Disconnect Wallet
</Button>
</div>
) : (
<Button
onClick={connect}
Expand Down
19 changes: 16 additions & 3 deletions web/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ const Navbar = () => {
className="flex flex-col space-y-4 text-2xl font-semibold text-center"
style={{ fontFamily: "var(--font-bebas-nueue)" }}
>
{address && (
<li>
<Link href="/my-cats">
<Avatar />
</Link>
</li>
)}
<li>
<ConnectWallet />
</li>
<li>
<Link
href="/create"
Expand Down Expand Up @@ -123,9 +133,12 @@ const Navbar = () => {
{/* Connect Wallet and Light/Dark Toggle for Desktop */}
<div className="hidden md:flex items-center space-x-4 ml-8">
{address ? (
<Link href="./my-cats">
<Avatar />
</Link>
<div className="flex space-x-8">
<ConnectWallet />
<Link href="./my-cats">
<Avatar />
</Link>
</div>
) : (
<ConnectWallet />
)}
Expand Down

0 comments on commit a093c76

Please sign in to comment.