ConnectEmbed

A component that allows the user to connect their wallet.

it renders the same UI as the ConnectWallet component's modal - but directly on the page instead of being in a modal.

It only renders UI if either one of the following conditions are met:

  • wallet is not connected

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

ConnectEmbed uses the useShowConnectEmbed hook internally to determine if it should be rendered or not. You can also use this hook to determine if you should render something else instead of ConnectEmbed

Example

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

Parameters

Returns