mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(deps): use published bitsocial react hooks
This commit is contained in:
@@ -29,7 +29,7 @@ vi.mock('react-i18next', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
|
||||
vi.mock('@bitsocial/bitsocial-react-hooks', () => ({
|
||||
useAccount: hookMocks.useAccount,
|
||||
useAccounts: hookMocks.useAccounts,
|
||||
deleteAccount: hookMocks.deleteAccount,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocial/bitsocial-react-hooks';
|
||||
import styles from './account-settings.module.css';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ vi.mock('react-i18next', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
|
||||
vi.mock('@bitsocial/bitsocial-react-hooks', () => ({
|
||||
setAccount: (account: unknown) => testState.setAccountMock(account),
|
||||
useAccount: () => testState.account,
|
||||
usePkcRpcSettings: () => testState.rpcSettings,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { memo, RefObject, useRef, useState } from 'react';
|
||||
import { setAccount, useAccount, usePkcRpcSettings } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
import { setAccount, useAccount, usePkcRpcSettings } from '@bitsocial/bitsocial-react-hooks';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import styles from './advanced-settings.module.css';
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ vi.mock('react-i18next', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
|
||||
vi.mock('@bitsocial/bitsocial-react-hooks', () => ({
|
||||
setAccount: hookMocks.setAccount,
|
||||
useAccount: hookMocks.useAccount,
|
||||
useResolvedAuthorAddress: hookMocks.useResolvedAuthorAddress,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { memo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocial/bitsocial-react-hooks';
|
||||
import styles from './crypto-address-setting.module.css';
|
||||
|
||||
const withErrorHandling = async <T,>(fn: () => Promise<T>, onError: (e: unknown) => void): Promise<T | undefined> => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { memo, useState } from 'react';
|
||||
import { Account, setAccount, useAccount } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
import { Account, setAccount, useAccount } from '@bitsocial/bitsocial-react-hooks';
|
||||
import styles from './crypto-wallets-setting.module.css';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
import capitalize from 'lodash/capitalize';
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ vi.mock('react-i18next', () => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
|
||||
vi.mock('@bitsocial/bitsocial-react-hooks', () => ({
|
||||
useAccount: () => accountState.value,
|
||||
useSubscribe: ({ communityAddress }: { communityAddress: string }) =>
|
||||
subscriptionMocks.byAddress.get(communityAddress) ?? {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { setAccount, useAccount, useSubscribe } from '@bitsocialnet/bitsocial-react-hooks';
|
||||
import { setAccount, useAccount, useSubscribe } from '@bitsocial/bitsocial-react-hooks';
|
||||
import getShortAddress from '../../../lib/get-short-address';
|
||||
import styles from './subscriptions-setting.module.css';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
Reference in New Issue
Block a user