Move nostr hooks to hooks/nostr
This commit is contained in:
parent
d6579eecf7
commit
66d082934f
|
@ -2,7 +2,7 @@ import { NostrSigner, NRelay1, NSecSigner } from '@nostrify/nostrify';
|
||||||
import { generateSecretKey } from 'nostr-tools';
|
import { generateSecretKey } from 'nostr-tools';
|
||||||
|
|
||||||
import { NostrRPC } from 'soapbox/features/nostr/NostrRPC';
|
import { NostrRPC } from 'soapbox/features/nostr/NostrRPC';
|
||||||
import { useBunkerStore } from 'soapbox/hooks/useBunkerStore';
|
import { useBunkerStore } from 'soapbox/hooks/nostr/useBunkerStore';
|
||||||
import { type AppDispatch } from 'soapbox/store';
|
import { type AppDispatch } from 'soapbox/store';
|
||||||
|
|
||||||
import { authLoggedIn, verifyCredentials } from './auth';
|
import { authLoggedIn, verifyCredentials } from './auth';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { NRelay1, NostrSigner } from '@nostrify/nostrify';
|
import { NRelay1, NostrSigner } from '@nostrify/nostrify';
|
||||||
import React, { createContext, useContext, useState, useEffect } from 'react';
|
import React, { createContext, useContext, useState, useEffect } from 'react';
|
||||||
|
|
||||||
import { useSigner } from 'soapbox/api/hooks/nostr/useSigner';
|
import { useSigner } from 'soapbox/hooks/nostr/useSigner';
|
||||||
import { useInstance } from 'soapbox/hooks/useInstance';
|
import { useInstance } from 'soapbox/hooks/useInstance';
|
||||||
|
|
||||||
interface NostrContextType {
|
interface NostrContextType {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { useSigner } from 'soapbox/api/hooks/nostr/useSigner';
|
|
||||||
import { useNostr } from 'soapbox/contexts/nostr-context';
|
import { useNostr } from 'soapbox/contexts/nostr-context';
|
||||||
import { NBunker } from 'soapbox/features/nostr/NBunker';
|
import { NBunker } from 'soapbox/features/nostr/NBunker';
|
||||||
|
import { useSigner } from 'soapbox/hooks/nostr/useSigner';
|
||||||
|
|
||||||
function useBunker() {
|
function useBunker() {
|
||||||
const { relay } = useNostr();
|
const { relay } = useNostr();
|
|
@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
||||||
|
|
||||||
import { NKeys } from 'soapbox/features/nostr/keys';
|
import { NKeys } from 'soapbox/features/nostr/keys';
|
||||||
import { useAppSelector } from 'soapbox/hooks';
|
import { useAppSelector } from 'soapbox/hooks';
|
||||||
import { useBunkerStore } from 'soapbox/hooks/useBunkerStore';
|
import { useBunkerStore } from 'soapbox/hooks/nostr/useBunkerStore';
|
||||||
|
|
||||||
export function useSigner() {
|
export function useSigner() {
|
||||||
const { connections } = useBunkerStore();
|
const { connections } = useBunkerStore();
|
|
@ -3,8 +3,6 @@ import { IntlProvider } from 'react-intl';
|
||||||
|
|
||||||
import { fetchMe } from 'soapbox/actions/me';
|
import { fetchMe } from 'soapbox/actions/me';
|
||||||
import { loadSoapboxConfig } from 'soapbox/actions/soapbox';
|
import { loadSoapboxConfig } from 'soapbox/actions/soapbox';
|
||||||
import { useBunker } from 'soapbox/api/hooks/nostr/useBunker';
|
|
||||||
import { useSigner } from 'soapbox/api/hooks/nostr/useSigner';
|
|
||||||
import LoadingScreen from 'soapbox/components/loading-screen';
|
import LoadingScreen from 'soapbox/components/loading-screen';
|
||||||
import { useNostr } from 'soapbox/contexts/nostr-context';
|
import { useNostr } from 'soapbox/contexts/nostr-context';
|
||||||
import {
|
import {
|
||||||
|
@ -14,6 +12,8 @@ import {
|
||||||
useLocale,
|
useLocale,
|
||||||
useInstance,
|
useInstance,
|
||||||
} from 'soapbox/hooks';
|
} from 'soapbox/hooks';
|
||||||
|
import { useBunker } from 'soapbox/hooks/nostr/useBunker';
|
||||||
|
import { useSigner } from 'soapbox/hooks/nostr/useSigner';
|
||||||
import MESSAGES from 'soapbox/messages';
|
import MESSAGES from 'soapbox/messages';
|
||||||
|
|
||||||
/** Load initial data from the backend */
|
/** Load initial data from the backend */
|
||||||
|
|
Loading…
Reference in New Issue