Tip Modal
In order to open Tip modal, you need to connect account first.
Usage
import { useIsConnected, useTipModal } from "@crossbell/connect-kit";
const characterId = 10;
const noteId = 291;
export function TipBtn() {
const isConnected = useIsConnected();
const { isActive, show, hide } = useTipModal();
if (!isConnected) return null;
return (
<>
<button onClick={() => show({ noteId, characterId })}>Tip Note</button>
<button onClick={() => show({ characterId })}>Tip Character</button>
</>
);
}
Return type
Option | Type | Description |
---|---|---|
isActive | boolean | Indicates whether the modal is activated or not |
show | (params: { noteId: number, characterId: number }) => void | Show modal |
hide | () => void | Hide modal |