Add "debug" option to NostrProvider

This commit is contained in:
Tristan Edwards
2022-12-20 07:33:48 +00:00
parent 44513b6c19
commit 864ab6a8c7

View File

@@ -38,9 +38,11 @@ const NostrContext = createContext<NostrContextType>({
export function NostrProvider({ export function NostrProvider({
children, children,
relayUrls, relayUrls,
debug,
}: { }: {
children: ReactNode; children: ReactNode;
relayUrls: string[]; relayUrls: string[];
debug?: boolean;
}) { }) {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
@@ -64,7 +66,7 @@ export function NostrProvider({
onEventCallback(relayUrl, event); onEventCallback(relayUrl, event);
} }
}, },
debug: true, debug,
}); });
sendEventRef.current = _sendEvent; sendEventRef.current = _sendEvent;