Convert instance to use zod
This commit is contained in:
@ -6,10 +6,10 @@ import { connectRequestSchema } from 'soapbox/schemas/nostr';
|
||||
import { jsonSchema } from 'soapbox/schemas/utils';
|
||||
|
||||
function useSignerStream() {
|
||||
const { nostr } = useInstance();
|
||||
const instance = useInstance();
|
||||
|
||||
const relayUrl = nostr.get('relay') as string | undefined;
|
||||
const pubkey = nostr.get('pubkey') as string | undefined;
|
||||
const relayUrl = instance.nostr?.relay;
|
||||
const pubkey = instance.nostr?.pubkey;
|
||||
|
||||
useEffect(() => {
|
||||
let relay: Relay | undefined;
|
||||
|
||||
@ -14,7 +14,7 @@ function useTimelineStream(...args: Parameters<typeof connectTimelineStream>) {
|
||||
const stream = useRef<(() => void) | null>(null);
|
||||
|
||||
const accessToken = useAppSelector(getAccessToken);
|
||||
const streamingUrl = instance.urls.get('streaming_api');
|
||||
const streamingUrl = instance.urls?.streaming_api;
|
||||
|
||||
const connect = () => {
|
||||
if (enabled && streamingUrl && !stream.current) {
|
||||
|
||||
Reference in New Issue
Block a user