useIsOpSignEnabled
Hook for indicating whether the Operator Sign is enabled or not.
function useIsOpSignEnabled(options: { characterId: number }): boolean;
Usage
import {
useIsOpSignEnabled,
useAccountCharacter,
useOpSignSettingsModal,
} from "@crossbell/connect-kit";
function App() {
const character = useAccountCharacter();
const isOpSignEnabled = useIsOpSignEnabled(character);
const opSignSettingsModal = useOpSignSettingsModal();
return (
<button
onClick={() => {
if (character) {
opSignSettingsModal.show(character);
}
}}
disabled={isOpSignEnabled}
>
{isOpSignEnabled ? "OP Sign Enabled" : "Enable OP Sign"}
</button>
);
}