mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(deps): migrate from pkc-react-hooks to bitsocial-react-hooks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
|
||||
import useAccountsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/accounts';
|
||||
import { DirectoryCommunity } from './use-directories';
|
||||
|
||||
export const useAccountSubplebbitsWithMetadata = (): DirectoryCommunity[] => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useAccount } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { useAccount } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { useSubplebbitField } from './use-stable-subplebbit';
|
||||
|
||||
interface AuthorPrivilegesProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useAccountComments, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { useAccountComments, Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
const useCatalogFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subplebbit: Subplebbit) => {
|
||||
const { address } = subplebbit || {};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMemo } from 'react';
|
||||
import { Comment } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { flattenCommentsPages } from '@bitsocialhq/pkc-react-hooks/dist/lib/utils';
|
||||
import { Comment } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { flattenCommentsPages } from '@bitsocialhq/bitsocial-react-hooks/dist/lib/utils';
|
||||
|
||||
const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => {
|
||||
let linkCount = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
|
||||
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
|
||||
|
||||
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
|
||||
const failedUrls = new Set<string>();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { create } from 'zustand';
|
||||
import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
|
||||
import localForageLru from '@bitsocialhq/bitsocial-react-hooks/dist/lib/localforage-lru/index.js';
|
||||
|
||||
interface HideStoreState {
|
||||
hiddenCids: { [key: string]: boolean };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useEffect } from 'react';
|
||||
import { Subplebbit } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { getFormattedTimeAgo } from '../lib/utils/time-utils';
|
||||
import useSubplebbitOfflineStore from '../stores/use-subplebbit-offline-store';
|
||||
import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo, useRef } from 'react';
|
||||
import { Comment, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { Comment, Subplebbit } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { getCommentMediaInfo, getHasThumbnail } from '../lib/utils/media-utils';
|
||||
|
||||
const MAX_POSTS = 8;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useFeed } from '@bitsocialhq/pkc-react-hooks';
|
||||
import useFeedsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/feeds';
|
||||
import { useFeed } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import useFeedsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/feeds';
|
||||
import { useDirectoryByAddress } from './use-directories';
|
||||
import { useBoardFeedPageSize } from './use-board-feed-page-size';
|
||||
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback } from 'react';
|
||||
import { Comment, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { Comment, usePublishComment } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import usePublishPostStore from '../stores/use-publish-post-store';
|
||||
|
||||
const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { Comment, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { Comment, usePublishComment } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import usePublishReplyStore from '../stores/use-publish-reply-store';
|
||||
import usePostNumberStore from '../stores/use-post-number-store';
|
||||
import { getQuotedCidsFromContent, mergeQuotedCids } from '../lib/utils/reply-quote-utils';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useMemo, useRef } from 'react';
|
||||
import { Comment } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { Comment } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { QUOTE_NUMBER_REGEX } from '../lib/utils/url-utils';
|
||||
import usePostNumberStore from '../stores/use-post-number-store';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
|
||||
import useSubplebbitsStore from '@bitsocialhq/bitsocial-react-hooks/dist/stores/subplebbits';
|
||||
|
||||
/**
|
||||
* Shallow compare two objects by keys and values.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import debounce from 'lodash/debounce';
|
||||
|
||||
interface CommentOrSubplebbit {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useSubplebbitStats } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { useSubplebbitStats } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import { create } from 'zustand';
|
||||
|
||||
export type SubplebbitsStatsState = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { isAllView, isSubscriptionsView, isModView } from '../lib/utils/view-uti
|
||||
import useThemeStore from '../stores/use-theme-store';
|
||||
import { useDirectories } from './use-directories';
|
||||
import { useResolvedSubplebbitAddress } from './use-resolved-subplebbit-address';
|
||||
import { useAccountComment } from '@bitsocialhq/pkc-react-hooks';
|
||||
import { useAccountComment } from '@bitsocialhq/bitsocial-react-hooks';
|
||||
import useSpecialThemeStore from '../stores/use-special-theme-store';
|
||||
import { isChristmas } from '../lib/utils/time-utils';
|
||||
import { updateFavicon, isSfwBoard } from '../lib/update-favicon';
|
||||
|
||||
Reference in New Issue
Block a user