diff --git a/src/components/common/ConnectWalletButton.tsx b/src/components/common/ConnectWalletButton.tsx index 9ab1372..d2ca081 100644 --- a/src/components/common/ConnectWalletButton.tsx +++ b/src/components/common/ConnectWalletButton.tsx @@ -1,6 +1,16 @@ import { useEffect, useRef, useState } from 'react'; import { useAccount, useConnect, useDisconnect } from 'wagmi'; import { Copy, Check } from 'lucide-react'; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import { Button } from '@/components/ui/button'; import { Popover, PopoverContent, @@ -21,6 +31,7 @@ function ConnectWalletButton() { const [showAddressPopover, setShowAddressPopover] = useState(false); const [copied, setCopied] = useState(false); const connectedAtRef = useRef(null); + const [showDisconnectDialog, setShowDisconnectDialog] = useState(false); const { address, isConnected } = useAccount(); const { connect, connectors, error, isPending } = useConnect(); const { disconnect } = useDisconnect(); @@ -74,41 +85,45 @@ function ConnectWalletButton() { {shortenAddress(address)} - -
-
-

- Wallet address + +

+
+ + Connected Wallet + + +
+
+

+ {address}

-

{address}

-
+
@@ -117,6 +132,42 @@ function ConnectWalletButton() {
+ + + + Disconnect wallet? + + Disconnecting clears your current wallet session and any + pending wallet state. You will need to reconnect to + continue. + + + + + + + + + + );