clean up database and update depedencies

This commit is contained in:
Ren Amamiya
2023-07-18 14:37:03 +07:00
parent 100204b267
commit 12bfa2fca1
8 changed files with 176 additions and 184 deletions

View File

@@ -1,13 +1,13 @@
// source: https://github.com/nostr-dev-kit/ndk-react/
import NDK from '@nostr-dev-kit/ndk';
import { ndkAdapter } from '@nostr-fetch/adapter-ndk';
import { NostrFetcher, normalizeRelayUrls } from 'nostr-fetch';
import { NostrFetcher, normalizeRelayUrlSet } from 'nostr-fetch';
import { useEffect, useState } from 'react';
import { getSetting } from '@libs/storage';
const setting = await getSetting('relays');
const relays = normalizeRelayUrls(JSON.parse(setting));
const relays = normalizeRelayUrlSet(JSON.parse(setting));
export const NDKInstance = () => {
const [ndk, setNDK] = useState<NDK | undefined>(undefined);