We have collected some good first questions here
You can call wallet_enable
method and check if it is rejected or not.
try {
await ckb.request({ method: 'wallet_enable' });
} catch {
// wallet not connected, maybe user rejected the request
console.log('wallet not connected');
}