add tauri stronghold

This commit is contained in:
Ren Amamiya
2023-07-09 07:55:23 +07:00
parent 24807b2758
commit a5c2ec080a
15 changed files with 1009 additions and 216 deletions

View File

@@ -1,15 +0,0 @@
import NDK from '@nostr-dev-kit/ndk';
import { createContext } from 'react';
import { initNDK } from '@libs/ndk';
import { getSetting } from '@libs/storage';
export const RelayContext = createContext<NDK>(null);
const relays = await getSetting('relays');
const relaysArray = JSON.parse(relays);
const ndk = await initNDK(relaysArray);
export function RelayProvider({ children }: { children: React.ReactNode }) {
return <RelayContext.Provider value={ndk}>{children}</RelayContext.Provider>;
}