Edit Character Profile Modal
In order to display the edit-character-profile-modal, you need to connect wallet first
Usage
import {
useIsConnected,
useAccountCharacter,
useEditCharacterProfileModal,
} from "@crossbell/connect-kit";
export function OpSignSettingsBtn() {
const isWalletConnected = useIsConnected("wallet");
const character = useAccountCharacter();
const { isActive, show, hide } = useEditCharacterProfileModal();
if (!isWalletConnected || !character) return null;
return (
<button
onClick={() => {
if (character) {
show();
}
}}
>
Edit Character Profile
</button>
);
}
Return type
Option | Type | Description |
---|---|---|
isActive | boolean | Indicates whether the modal is activated or not |
show | () => void | Show modal |
hide | () => void | Hide modal |