useAutoConnectionStatus
The useAutoConnectionStatus
hook retrieves the status for the initial wallet auto-connection
process.
import { ConnectButton, useAutoConnectionStatus } from '@mysten/dapp-kit';
function MyComponent() {
const autoConnectionStatus = useAutoConnectionStatus();
return (
<div>
<ConnectButton />
<div>Auto-connection status: {autoConnectionStatus}</div>
</div>
);
}
Example
Auto-connection status properties
disabled
- When the auto-connection functionality is disabledidle
- When the initial auto-connection attempt hasn't been made yetsettled
- When an auto-connection attempt has been made