Disconnect Modal
In order to display the disconnect modal, you need to connect first
💡
It is recommended to use ConnectButton to render the connect/disconnect button.
Usage
import { useIsConnected, useDisconnectModal } from "@crossbell/connect-kit";
export function DisconnectBtn() {
const isConnected = useIsConnected();
const { isActive, show, hide } = useDisconnectModal();
return isConnected ? <button onClick={show}>Disconnect</button> : null;
}Return type
| Option | Type | Description |
|---|---|---|
| isActive | boolean | Indicates whether the modal is activated or not |
| show | () => void | Show modal |
| hide | () => void | Hide modal |