Documentation
Modals
Disconnect

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

OptionTypeDescription
isActivebooleanIndicates whether the modal is activated or not
show() => voidShow modal
hide() => voidHide modal