useShowConnectEmbed

Returns true if the <ConnectEmbed /> should be rendered. It returns true if either one of the following conditions are met:

  • the wallet is not connected

  • the wallet is connected but the user is not signed in and auth is required ( loginOptional is not set to false )

Example

function Example() {
const loginOptional = false;
const showConnectEmbed = useShowConnectEmbed(loginOptional);
if (!showConnectEmbed) {
return <div> Wallet is connected </div>;
}
return (
<div>
<ConnectEmbed
auth={{
loginOptional,
}}
/>
</div>
);
}
function useShowConnectEmbed(loginOptional?: boolean): boolean;

Parameters

Specify whether the <ConnectEmbed /> you want to render has auth enabled or not. If not specified, it is assumed to be false ( login is required )

Type

let loginOptional: boolean;

Returns

let returnType: boolean;