Documentation
Modals
Edit Character Profile

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

OptionTypeDescription
isActivebooleanIndicates whether the modal is activated or not
show() => voidShow modal
hide() => voidHide modal