chore(deps): replace plebbit/plebbit-react-hooks with bitsocialhq/pkc-react-hooks

bitsocialhq/pkc-react-hooks is a fork of plebbit-react-hooks that we're maintaining temporarily as an attempt to modernize the original repository using AI tools, possibly merging changes back into plebbit-react-hooks, which should also be rebranded to pkc-react-hooks eventually, under the org pkcprotocol.
This commit is contained in:
plebeius
2026-02-28 15:02:56 +08:00
parent 8d36673ad1
commit e556a9e662
64 changed files with 638 additions and 946 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ Only record items that are repo-specific, likely to recur, and have a concrete m
- Zustand for shared state - Zustand for shared state
- React Router v6 - React Router v6
- Vite - Vite
- plebbit-react-hooks - pkc-react-hooks
- i18next - i18next
- yarn - yarn
- oxlint - oxlint
@@ -72,7 +72,7 @@ src/
### React Architecture Rules ### React Architecture Rules
- Do not use `useState` for shared/global state. Use Zustand stores in `src/stores/`. - Do not use `useState` for shared/global state. Use Zustand stores in `src/stores/`.
- Do not use `useEffect` for data fetching. Use `plebbit-react-hooks`. - Do not use `useEffect` for data fetching. Use `pkc-react-hooks`.
- Do not sync derived state with effects. Compute during render. - Do not sync derived state with effects. Compute during render.
- Avoid copy-paste logic across components. Extract custom hooks in `src/hooks/`. - Avoid copy-paste logic across components. Extract custom hooks in `src/hooks/`.
- Avoid boolean flag soup for complex flows; model state clearly in Zustand. - Avoid boolean flag soup for complex flows; model state clearly in Zustand.
+1 -1
View File
@@ -6,7 +6,7 @@ Use this playbook when setting up/adjusting skills and external tooling.
### Context7 (library docs) ### Context7 (library docs)
For up-to-date docs on libraries like `plebbit-react-hooks` and `plebbit-js`. For up-to-date docs on libraries.
```bash ```bash
npx skills add https://github.com/intellectronica/agent-skills --skill context7 npx skills add https://github.com/intellectronica/agent-skills --skill context7
+1 -1
View File
@@ -7,11 +7,11 @@
"license": "GPL-2.0-only", "license": "GPL-2.0-only",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@bitsocialhq/pkc-react-hooks": "https://github.com/bitsocialhq/pkc-react-hooks.git#8d93bb78eb570f0769904cb6ce5cb83ab8b277d4",
"@capacitor/app": "7.0.1", "@capacitor/app": "7.0.1",
"@capacitor/status-bar": "7.0.1", "@capacitor/status-bar": "7.0.1",
"@capawesome/capacitor-android-edge-to-edge-support": "7.2.2", "@capawesome/capacitor-android-edge-to-edge-support": "7.2.2",
"@floating-ui/react": "0.26.1", "@floating-ui/react": "0.26.1",
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#a828bd598bcc392ed379136feaee0a7b1c8cd23f",
"@react-spring/web": "9.7.5", "@react-spring/web": "9.7.5",
"@types/node": "20.8.2", "@types/node": "20.8.2",
"@types/react": "18.2.25", "@types/react": "18.2.25",
+2 -2
View File
@@ -1,7 +1,7 @@
import { lazy, Suspense, useEffect } from 'react'; import { lazy, Suspense, useEffect } from 'react';
import { Navigate, Outlet, Route, Routes, useLocation, useParams } from 'react-router-dom'; import { Navigate, Outlet, Route, Routes, useLocation, useParams } from 'react-router-dom';
import { useAccount, useAccountComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { useAccount, useAccountComment, useSubplebbit } from '@bitsocialhq/pkc-react-hooks';
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { initSnow, removeSnow } from './lib/snow'; import { initSnow, removeSnow } from './lib/snow';
import { isAllView, isModView, isSubscriptionsView } from './lib/utils/view-utils'; import { isAllView, isModView, isSubscriptionsView } from './lib/utils/view-utils';
import { preloadThemeAssets } from './lib/utils/preload-utils'; import { preloadThemeAssets } from './lib/utils/preload-utils';
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'; import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useAccountComment, useComment, useSubscribe } from '@plebbit/plebbit-react-hooks'; import { useAccountComment, useComment, useSubscribe } from '@bitsocialhq/pkc-react-hooks';
import { isAllView, isCatalogView, isModView, isModQueueView, isPendingPostView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils'; import { isAllView, isCatalogView, isModView, isModQueueView, isPendingPostView, isPostPageView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { usePostPageNumber } from '../../hooks/use-post-page-number'; import { usePostPageNumber } from '../../hooks/use-post-page-number';
import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories'; import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories';
+3 -3
View File
@@ -1,9 +1,9 @@
import { useState } from 'react'; import { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useLocation, useParams, useNavigate } from 'react-router-dom'; import { useLocation, useParams, useNavigate } from 'react-router-dom';
import { useAccountComment } from '@plebbit/plebbit-react-hooks'; import { useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits'; import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import { useStableSubplebbit } from '../../hooks/use-stable-subplebbit'; import { useStableSubplebbit } from '../../hooks/use-stable-subplebbit';
import { isAllView, isSubscriptionsView, isModView } from '../../lib/utils/view-utils'; import { isAllView, isSubscriptionsView, isModView } from '../../lib/utils/view-utils';
@@ -1,6 +1,6 @@
import { useState, useMemo } from 'react'; import { useState, useMemo } from 'react';
import { Link, useLocation } from 'react-router-dom'; import { Link, useLocation } from 'react-router-dom';
import { useAccount } from '@plebbit/plebbit-react-hooks'; import { useAccount } from '@bitsocialhq/pkc-react-hooks';
import useBoardsBarEditModalStore from '../../stores/use-boardsbar-edit-modal-store'; import useBoardsBarEditModalStore from '../../stores/use-boardsbar-edit-modal-store';
import useBoardsBarVisibilityStore from '../../stores/use-boardsbar-visibility-store'; import useBoardsBarVisibilityStore from '../../stores/use-boardsbar-visibility-store';
import { getAllBoardCodes } from '../../constants/board-codes'; import { getAllBoardCodes } from '../../constants/board-codes';
+2 -2
View File
@@ -2,8 +2,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'; import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import { useAccountComment } from '@plebbit/plebbit-react-hooks'; import { useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { isAllView, isCatalogView, isModView, isSubscriptionsView } from '../../lib/utils/view-utils'; import { isAllView, isCatalogView, isModView, isSubscriptionsView } from '../../lib/utils/view-utils';
import { useDirectories, DirectoryCommunity } from '../../hooks/use-directories'; import { useDirectories, DirectoryCommunity } from '../../hooks/use-directories';
import { useBoardPath, useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address'; import { useBoardPath, useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address';
+1 -1
View File
@@ -3,7 +3,7 @@ import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Link, useLocation, useParams } from 'react-router-dom'; import { Link, useLocation, useParams } from 'react-router-dom';
import { useFloating, offset, size, Placement } from '@floating-ui/react'; import { useFloating, offset, size, Placement } from '@floating-ui/react';
import { Comment, useReplies } from '@plebbit/plebbit-react-hooks'; import { Comment, useReplies } from '@bitsocialhq/pkc-react-hooks';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import { shouldShowSnow } from '../../lib/snow'; import { shouldShowSnow } from '../../lib/snow';
import { getHasThumbnail } from '../../lib/utils/media-utils'; import { getHasThumbnail } from '../../lib/utils/media-utils';
@@ -1,6 +1,6 @@
import { useRef, useState, useEffect, useCallback } from 'react'; import { useRef, useState, useEffect, useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Challenge as ChallengeType, useAccount, useComment } from '@plebbit/plebbit-react-hooks'; import { Challenge as ChallengeType, useAccount, useComment } from '@bitsocialhq/pkc-react-hooks';
import { getPublicationPreview, getPublicationType, getVotePreview } from '../../lib/utils/challenge-utils'; import { getPublicationPreview, getPublicationType, getVotePreview } from '../../lib/utils/challenge-utils';
import useIsMobile from '../../hooks/use-is-mobile'; import useIsMobile from '../../hooks/use-is-mobile';
import useChallengesStore from '../../stores/use-challenges-store'; import useChallengesStore from '../../stores/use-challenges-store';
@@ -1,8 +1,8 @@
import { Fragment, useMemo, useState } from 'react'; import { Fragment, useMemo, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import { Comment, useComment } from '@plebbit/plebbit-react-hooks'; import { Comment, useComment } from '@bitsocialhq/pkc-react-hooks';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages'; import useSubplebbitsPagesStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits-pages';
import usePostNumberStore from '../../stores/use-post-number-store'; import usePostNumberStore from '../../stores/use-post-number-store';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import { getFormattedDate, getFormattedTimeAgo } from '../../lib/utils/time-utils'; import { getFormattedDate, getFormattedTimeAgo } from '../../lib/utils/time-utils';
+1 -1
View File
@@ -8,7 +8,7 @@ import {
usePublishCommentEdit, usePublishCommentEdit,
usePublishCommentModeration, usePublishCommentModeration,
PublishCommentModerationOptions, PublishCommentModerationOptions,
} from '@plebbit/plebbit-react-hooks'; } from '@bitsocialhq/pkc-react-hooks';
import styles from './edit-menu.module.css'; import styles from './edit-menu.module.css';
import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils'; import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils';
import useChallengesStore from '../../stores/use-challenges-store'; import useChallengesStore from '../../stores/use-challenges-store';
+2 -2
View File
@@ -16,8 +16,8 @@ import { Link, useLocation, useParams } from 'react-router-dom';
import { canEmbed } from '../embed'; import { canEmbed } from '../embed';
import { is5chanLink, transform5chanLinkToInternal, preprocess5chanPatterns } from '../../lib/utils/url-utils'; import { is5chanLink, transform5chanLinkToInternal, preprocess5chanPatterns } from '../../lib/utils/url-utils';
import usePostNumberStore from '../../stores/use-post-number-store'; import usePostNumberStore from '../../stores/use-post-number-store';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages'; import useSubplebbitsPagesStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits-pages';
import { useComment } from '@plebbit/plebbit-react-hooks'; import { useComment } from '@bitsocialhq/pkc-react-hooks';
import ReplyQuotePreview from '../reply-quote-preview'; import ReplyQuotePreview from '../reply-quote-preview';
const safeParseUrl = (href: string): URL | null => { const safeParseUrl = (href: string): URL | null => {
+2 -2
View File
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState, useCallback } from 'react';
import { Trans, useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom'; import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { Comment, useEditedComment, useReplies, useAccount, useAccountComment } from '@plebbit/plebbit-react-hooks'; import { Comment, useEditedComment, useReplies, useAccount, useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import styles from '../../views/post/post.module.css'; import styles from '../../views/post/post.module.css';
import { CommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail, getMediaDimensions } from '../../lib/utils/media-utils'; import { CommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail, getMediaDimensions } from '../../lib/utils/media-utils';
@@ -42,7 +42,7 @@ import useChallengesStore from '../../stores/use-challenges-store';
import useFeedResetStore from '../../stores/use-feed-reset-store'; import useFeedResetStore from '../../stores/use-feed-reset-store';
import usePostNumberStore from '../../stores/use-post-number-store'; import usePostNumberStore from '../../stores/use-post-number-store';
import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils'; import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-utils';
import { usePublishCommentModeration } from '@plebbit/plebbit-react-hooks'; import { usePublishCommentModeration } from '@bitsocialhq/pkc-react-hooks';
import useQuotedByMap from '../../hooks/use-quoted-by-map'; import useQuotedByMap from '../../hooks/use-quoted-by-map';
import useProgressiveRender from '../../hooks/use-progressive-render'; import useProgressiveRender from '../../hooks/use-progressive-render';
import { BOARD_REPLIES_PREVIEW_FETCH_SIZE, BOARD_REPLIES_PREVIEW_VISIBLE_COUNT, REPLIES_PER_PAGE } from '../../lib/constants'; import { BOARD_REPLIES_PREVIEW_FETCH_SIZE, BOARD_REPLIES_PREVIEW_VISIBLE_COUNT, REPLIES_PER_PAGE } from '../../lib/constants';
+3 -3
View File
@@ -1,10 +1,10 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { Comment, setAccount, useAccount, useAccountComment, useAccountSubplebbits, useEditedComment } from '@plebbit/plebbit-react-hooks'; import { Comment, setAccount, useAccount, useAccountComment, useAccountSubplebbits, useEditedComment } from '@bitsocialhq/pkc-react-hooks';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits'; import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages'; import useSubplebbitsPagesStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits-pages';
import { getLinkMediaInfo } from '../../lib/utils/media-utils'; import { getLinkMediaInfo } from '../../lib/utils/media-utils';
import { formatMarkdown } from '../../lib/utils/post-utils'; import { formatMarkdown } from '../../lib/utils/post-utils';
import { isValidURL } from '../../lib/utils/url-utils'; import { isValidURL } from '../../lib/utils/url-utils';
@@ -1,7 +1,7 @@
import { memo, useState } from 'react'; import { memo, useState } from 'react';
import { createPortal } from 'react-dom'; import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { autoUpdate, flip, FloatingFocusManager, offset, shift, useClick, useDismiss, useFloating, useId, useInteractions, useRole } from '@floating-ui/react'; import { autoUpdate, flip, FloatingFocusManager, offset, shift, useClick, useDismiss, useFloating, useId, useInteractions, useRole } from '@floating-ui/react';
import styles from './post-menu-mobile.module.css'; import styles from './post-menu-mobile.module.css';
import { getCommentMediaInfo } from '../../../lib/utils/media-utils'; import { getCommentMediaInfo } from '../../../lib/utils/media-utils';
+1 -1
View File
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState, useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom'; import { Link, useLocation, useNavigationType, useParams } from 'react-router-dom';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { Comment, useEditedComment, useReplies, useAccount, usePublishCommentModeration, useAccountComment } from '@plebbit/plebbit-react-hooks'; import { Comment, useEditedComment, useReplies, useAccount, usePublishCommentModeration, useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import getShortAddress from '../../lib/get-short-address'; import getShortAddress from '../../lib/get-short-address';
import styles from '../../views/post/post.module.css'; import styles from '../../views/post/post.module.css';
import { shouldShowSnow } from '../../lib/snow'; import { shouldShowSnow } from '../../lib/snow';
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { setAccount, useAccount } from '@bitsocialhq/pkc-react-hooks';
import { useSubplebbitField } from '../../hooks/use-stable-subplebbit'; import { useSubplebbitField } from '../../hooks/use-stable-subplebbit';
import { formatMarkdown } from '../../lib/utils/post-utils'; import { formatMarkdown } from '../../lib/utils/post-utils';
import { getFormattedTimeAgo } from '../../lib/utils/time-utils'; import { getFormattedTimeAgo } from '../../lib/utils/time-utils';
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom'; import { createPortal } from 'react-dom';
import { Link, useLocation, useNavigate } from 'react-router-dom'; import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Comment, useAccount } from '@plebbit/plebbit-react-hooks'; import { Comment, useAccount } from '@bitsocialhq/pkc-react-hooks';
import { useFloating, offset, shift, size, autoUpdate, Placement } from '@floating-ui/react'; import { useFloating, offset, shift, size, autoUpdate, Placement } from '@floating-ui/react';
import { useDirectories } from '../../hooks/use-directories'; import { useDirectories } from '../../hooks/use-directories';
import { getBoardPath } from '../../lib/utils/route-utils'; import { getBoardPath } from '../../lib/utils/route-utils';
@@ -15,7 +15,7 @@ vi.mock('react-i18next', () => ({
}), }),
})); }));
vi.mock('@plebbit/plebbit-react-hooks', () => ({ vi.mock('@bitsocialhq/pkc-react-hooks', () => ({
useAccount: () => ({ id: 'test-id', name: 'Account 1', author: { address: '0x123', shortAddress: '0x1...3' } }), useAccount: () => ({ id: 'test-id', name: 'Account 1', author: { address: '0x123', shortAddress: '0x1...3' } }),
useAccounts: () => ({ accounts: [{ id: 'test-id', name: 'Account 1', author: { shortAddress: '0x1...3' } }] }), useAccounts: () => ({ accounts: [{ id: 'test-id', name: 'Account 1', author: { shortAddress: '0x1...3' } }] }),
deleteAccount: vi.fn(), deleteAccount: vi.fn(),
@@ -1,5 +1,5 @@
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@plebbit/plebbit-react-hooks'; import { deleteAccount, exportAccount, importAccount, setActiveAccount, useAccount, useAccounts } from '@bitsocialhq/pkc-react-hooks';
import styles from './account-settings.module.css'; import styles from './account-settings.module.css';
import { Capacitor } from '@capacitor/core'; import { Capacitor } from '@capacitor/core';
import { useLocation, useNavigate } from 'react-router-dom'; import { useLocation, useNavigate } from 'react-router-dom';
@@ -1,5 +1,5 @@
import { RefObject, useRef, useState } from 'react'; import { RefObject, useRef, useState } from 'react';
import { setAccount, useAccount, usePlebbitRpcSettings } from '@plebbit/plebbit-react-hooks'; import { setAccount, useAccount, usePlebbitRpcSettings } from '@bitsocialhq/pkc-react-hooks';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import styles from './advanced-settings.module.css'; import styles from './advanced-settings.module.css';
@@ -1,6 +1,6 @@
import { useState } from 'react'; import { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useAccount, setAccount, useResolvedAuthorAddress } from '@plebbit/plebbit-react-hooks'; import { useAccount, setAccount, useResolvedAuthorAddress } from '@bitsocialhq/pkc-react-hooks';
import styles from './crypto-address-setting.module.css'; import styles from './crypto-address-setting.module.css';
const withErrorHandling = async <T,>(fn: () => Promise<T>, onError: (e: unknown) => void): Promise<T | undefined> => { const withErrorHandling = async <T,>(fn: () => Promise<T>, onError: (e: unknown) => void): Promise<T | undefined> => {
@@ -1,5 +1,5 @@
import { useState } from 'react'; import { useState } from 'react';
import { Account, setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { Account, setAccount, useAccount } from '@bitsocialhq/pkc-react-hooks';
import styles from './crypto-wallets-setting.module.css'; import styles from './crypto-wallets-setting.module.css';
import { Trans, useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import capitalize from 'lodash/capitalize'; import capitalize from 'lodash/capitalize';
@@ -1,4 +1,4 @@
import { setAccount, useAccount, useSubscribe } from '@plebbit/plebbit-react-hooks'; import { setAccount, useAccount, useSubscribe } from '@bitsocialhq/pkc-react-hooks';
import getShortAddress from '../../../lib/get-short-address'; import getShortAddress from '../../../lib/get-short-address';
import styles from './subscriptions-setting.module.css'; import styles from './subscriptions-setting.module.css';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -1,4 +1,4 @@
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { DirectoryCommunity } from './use-directories'; import { DirectoryCommunity } from './use-directories';
export const useAccountSubplebbitsWithMetadata = (): DirectoryCommunity[] => { export const useAccountSubplebbitsWithMetadata = (): DirectoryCommunity[] => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import { useAccount } from '@plebbit/plebbit-react-hooks'; import { useAccount } from '@bitsocialhq/pkc-react-hooks';
import { useSubplebbitField } from './use-stable-subplebbit'; import { useSubplebbitField } from './use-stable-subplebbit';
interface AuthorPrivilegesProps { interface AuthorPrivilegesProps {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import { useAccountComments, Subplebbit } from '@plebbit/plebbit-react-hooks'; import { useAccountComments, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
const useCatalogFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subplebbit: Subplebbit) => { const useCatalogFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subplebbit: Subplebbit) => {
const { address } = subplebbit || {}; const { address } = subplebbit || {};
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { flattenCommentsPages } from '@plebbit/plebbit-react-hooks/dist/lib/utils'; import { flattenCommentsPages } from '@bitsocialhq/pkc-react-hooks/dist/lib/utils';
const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => { const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => {
let linkCount = 0; let linkCount = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js'; import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 }); const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
const failedUrls = new Set<string>(); const failedUrls = new Set<string>();
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';
import { create } from 'zustand'; import { create } from 'zustand';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js'; import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
interface HideStoreState { interface HideStoreState {
hiddenCids: { [key: string]: boolean }; hiddenCids: { [key: string]: boolean };
+1 -1
View File
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Subplebbit } from '@plebbit/plebbit-react-hooks'; import { Subplebbit } from '@bitsocialhq/pkc-react-hooks';
import { getFormattedTimeAgo } from '../lib/utils/time-utils'; import { getFormattedTimeAgo } from '../lib/utils/time-utils';
import useSubplebbitOfflineStore from '../stores/use-subplebbit-offline-store'; import useSubplebbitOfflineStore from '../stores/use-subplebbit-offline-store';
import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store'; import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo, useRef } from 'react'; import { useMemo, useRef } from 'react';
import { Comment, Subplebbit } from '@plebbit/plebbit-react-hooks'; import { Comment, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
import { getCommentMediaInfo, getHasThumbnail } from '../lib/utils/media-utils'; import { getCommentMediaInfo, getHasThumbnail } from '../lib/utils/media-utils';
const MAX_POSTS = 8; const MAX_POSTS = 8;
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import { useFeed } from '@plebbit/plebbit-react-hooks'; import { useFeed } from '@bitsocialhq/pkc-react-hooks';
import useFeedsStore from '@plebbit/plebbit-react-hooks/dist/stores/feeds'; import useFeedsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/feeds';
import { useDirectoryByAddress } from './use-directories'; import { useDirectoryByAddress } from './use-directories';
import { useBoardFeedPageSize } from './use-board-feed-page-size'; import { useBoardFeedPageSize } from './use-board-feed-page-size';
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution'; import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback } from 'react'; import { useCallback } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks'; import { Comment, useAccount, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
import usePublishPostStore from '../stores/use-publish-post-store'; import usePublishPostStore from '../stores/use-publish-post-store';
const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) => { const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks'; import { Comment, useAccount, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
import usePublishReplyStore from '../stores/use-publish-reply-store'; import usePublishReplyStore from '../stores/use-publish-reply-store';
import usePostNumberStore from '../stores/use-post-number-store'; import usePostNumberStore from '../stores/use-post-number-store';
import { getQuotedCidsFromContent, mergeQuotedCids } from '../lib/utils/reply-quote-utils'; import { getQuotedCidsFromContent, mergeQuotedCids } from '../lib/utils/reply-quote-utils';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useRef } from 'react'; import { useCallback, useMemo, useRef } from 'react';
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { QUOTE_NUMBER_REGEX } from '../lib/utils/url-utils'; import { QUOTE_NUMBER_REGEX } from '../lib/utils/url-utils';
import usePostNumberStore from '../stores/use-post-number-store'; import usePostNumberStore from '../stores/use-post-number-store';
+1 -1
View File
@@ -1,4 +1,4 @@
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits'; import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
/** /**
* Shallow compare two objects by keys and values. * Shallow compare two objects by keys and values.
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react'; import { useMemo } from 'react';
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@plebbit/plebbit-react-hooks'; import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialhq/pkc-react-hooks';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
interface CommentOrSubplebbit { interface CommentOrSubplebbit {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect } from 'react'; import { useEffect } from 'react';
import { useSubplebbitStats } from '@plebbit/plebbit-react-hooks'; import { useSubplebbitStats } from '@bitsocialhq/pkc-react-hooks';
import { create } from 'zustand'; import { create } from 'zustand';
export type SubplebbitsStatsState = { export type SubplebbitsStatsState = {
+1 -1
View File
@@ -4,7 +4,7 @@ import { isAllView, isSubscriptionsView, isModView } from '../lib/utils/view-uti
import useThemeStore from '../stores/use-theme-store'; import useThemeStore from '../stores/use-theme-store';
import { useDirectories } from './use-directories'; import { useDirectories } from './use-directories';
import { useResolvedSubplebbitAddress } from './use-resolved-subplebbit-address'; import { useResolvedSubplebbitAddress } from './use-resolved-subplebbit-address';
import { useAccountComment } from '@plebbit/plebbit-react-hooks'; import { useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import useSpecialThemeStore from '../stores/use-special-theme-store'; import useSpecialThemeStore from '../stores/use-special-theme-store';
import { isChristmas } from '../lib/utils/time-utils'; import { isChristmas } from '../lib/utils/time-utils';
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification } from '@plebbit/plebbit-react-hooks'; import { ChallengeVerification } from '@bitsocialhq/pkc-react-hooks';
import directoriesData from '../../data/5chan-directories.json'; import directoriesData from '../../data/5chan-directories.json';
import { getBoardPath } from './route-utils'; import { getBoardPath } from './route-utils';
+1 -1
View File
@@ -1,4 +1,4 @@
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js'; import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
import { canEmbed } from '../../components/embed'; import { canEmbed } from '../../components/embed';
import memoize from 'memoizee'; import memoize from 'memoizee';
import { isValidURL } from './url-utils'; import { isValidURL } from './url-utils';
+2 -2
View File
@@ -1,5 +1,5 @@
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits'; import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
/** /**
* Checks if a text matches a pattern according to various pattern matching rules: * Checks if a text matches a pattern according to various pattern matching rules:
+1 -1
View File
@@ -1,4 +1,4 @@
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
export type PostMenuProps = { export type PostMenuProps = {
cid?: string; cid?: string;
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from 'zustand'; import { create } from 'zustand';
import { persist } from 'zustand/middleware'; import { persist } from 'zustand/middleware';
import { Comment } from '@plebbit/plebbit-react-hooks'; import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { commentMatchesPattern } from '../lib/utils/pattern-utils'; import { commentMatchesPattern } from '../lib/utils/pattern-utils';
interface FilterItem { interface FilterItem {
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from 'zustand'; import { create } from 'zustand';
import { Challenge } from '@plebbit/plebbit-react-hooks'; import { Challenge } from '@bitsocialhq/pkc-react-hooks';
let nextChallengeId = 0; let nextChallengeId = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from 'zustand'; import { create } from 'zustand';
import type { Comment } from '@plebbit/plebbit-react-hooks'; import type { Comment } from '@bitsocialhq/pkc-react-hooks';
interface PostNumberState { interface PostNumberState {
// Post numbers are only unique within a subplebbit, so scope by address // Post numbers are only unique within a subplebbit, so scope by address
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification, Comment, PublishCommentOptions } from '@plebbit/plebbit-react-hooks'; import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialhq/pkc-react-hooks';
import { create } from 'zustand'; import { create } from 'zustand';
import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils'; import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils';
import useChallengesStore from './use-challenges-store'; import useChallengesStore from './use-challenges-store';
+1 -1
View File
@@ -1,4 +1,4 @@
import { ChallengeVerification, Comment, PublishCommentOptions } from '@plebbit/plebbit-react-hooks'; import { ChallengeVerification, Comment, PublishCommentOptions } from '@bitsocialhq/pkc-react-hooks';
import { create } from 'zustand'; import { create } from 'zustand';
import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils'; import { alertChallengeVerificationFailed } from '../lib/utils/challenge-utils';
import useChallengesStore from './use-challenges-store'; import useChallengesStore from './use-challenges-store';
+1 -1
View File
@@ -1,5 +1,5 @@
import { create, StoreApi } from 'zustand'; import { create, StoreApi } from 'zustand';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js'; import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
interface ThemeState { interface ThemeState {
themes: { themes: {
@@ -28,7 +28,7 @@ vi.mock('../../../lib/utils/account-editor-utils', () => ({
buildSavePayload: vi.fn((parsed: { account: Record<string, unknown> }, id: string) => ({ ...parsed.account, id })), buildSavePayload: vi.fn((parsed: { account: Record<string, unknown> }, id: string) => ({ ...parsed.account, id })),
})); }));
vi.mock('@plebbit/plebbit-react-hooks', () => ({ vi.mock('@bitsocialhq/pkc-react-hooks', () => ({
useAccount: () => ({ id: 'test-id', name: 'Account 1', author: { address: '0x123', shortAddress: '0x1...3' } }), useAccount: () => ({ id: 'test-id', name: 'Account 1', author: { address: '0x123', shortAddress: '0x1...3' } }),
setAccount: vi.fn(), setAccount: vi.fn(),
})); }));
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom'; import { useLocation, useNavigate } from 'react-router-dom';
import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks'; import { setAccount, useAccount } from '@bitsocialhq/pkc-react-hooks';
import { buildEditableAccountJson, safeParseAccountJson, buildSavePayload } from '../../lib/utils/account-editor-utils'; import { buildEditableAccountJson, safeParseAccountJson, buildSavePayload } from '../../lib/utils/account-editor-utils';
import styles from './account-data-editor.module.css'; import styles from './account-data-editor.module.css';
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef } from 'react'; import { useCallback, useEffect, useMemo, useRef } from 'react';
import { useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom'; import { useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom';
import { Comment, useAccount, useAccountComments, useAccountSubplebbits, useFeed, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { Comment, useAccount, useAccountComments, useAccountSubplebbits, useFeed, useSubplebbit } from '@bitsocialhq/pkc-react-hooks';
import { useSubplebbitField } from '../../hooks/use-stable-subplebbit'; import { useSubplebbitField } from '../../hooks/use-stable-subplebbit';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, useState, useCallback } from 'react'; import { useEffect, useMemo, useRef, useState, useCallback } from 'react';
import { useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom'; import { useLocation, useNavigate, useNavigationType, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Comment, useAccount, useFeed, useSubplebbit, useAccountComments } from '@plebbit/plebbit-react-hooks'; import { Comment, useAccount, useFeed, useSubplebbit, useAccountComments } from '@bitsocialhq/pkc-react-hooks';
import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso';
import useCatalogFeedRows from '../../hooks/use-catalog-feed-rows'; import useCatalogFeedRows from '../../hooks/use-catalog-feed-rows';
import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories'; import { useDirectories, useDirectoryByAddress } from '../../hooks/use-directories';
+1 -1
View File
@@ -1,6 +1,6 @@
import { Link, useNavigate } from 'react-router-dom'; import { Link, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { useDirectoriesState, useDirectories, DirectoryCommunity } from '../../../hooks/use-directories'; import { useDirectoriesState, useDirectories, DirectoryCommunity } from '../../../hooks/use-directories';
import { getBoardPath } from '../../../lib/utils/route-utils'; import { getBoardPath } from '../../../lib/utils/route-utils';
import useDisclaimerModalStore from '../../../stores/use-disclaimer-modal-store'; import useDisclaimerModalStore from '../../../stores/use-disclaimer-modal-store';
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef, FormEvent } from 'react'; import { useEffect, useMemo, useRef, FormEvent } from 'react';
import { Link, useNavigate } from 'react-router-dom'; import { Link, useNavigate } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next'; import { Trans, useTranslation } from 'react-i18next';
import { useSubplebbits } from '@plebbit/plebbit-react-hooks'; import { useSubplebbits } from '@bitsocialhq/pkc-react-hooks';
import styles from './home.module.css'; import styles from './home.module.css';
import { useDirectories, useDirectoryAddresses } from '../../hooks/use-directories'; import { useDirectories, useDirectoryAddresses } from '../../hooks/use-directories';
import { SubplebbitStatsCollector, useSubplebbitsStatsStore } from '../../hooks/use-subplebbits-stats'; import { SubplebbitStatsCollector, useSubplebbitsStatsStore } from '../../hooks/use-subplebbits-stats';
@@ -1,7 +1,7 @@
import { memo, useMemo } from 'react'; import { memo, useMemo } from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Comment, Subplebbit } from '@plebbit/plebbit-react-hooks'; import { Comment, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
import styles from '../home.module.css'; import styles from '../home.module.css';
import usePopularPosts from '../../../hooks/use-popular-posts'; import usePopularPosts from '../../../hooks/use-popular-posts';
import usePopularThreadsOptionsStore from '../../../stores/use-popular-threads-options-store'; import usePopularThreadsOptionsStore from '../../../stores/use-popular-threads-options-store';
+2 -2
View File
@@ -1,8 +1,8 @@
import React, { useMemo, useState, useEffect, useCallback, memo } from 'react'; import React, { useMemo, useState, useEffect, useCallback, memo } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useParams, Link } from 'react-router-dom'; import { useParams, Link } from 'react-router-dom';
import { useFeed, Comment, usePublishCommentModeration, useEditedComment, useSubplebbit, useComment } from '@plebbit/plebbit-react-hooks'; import { useFeed, Comment, usePublishCommentModeration, useEditedComment, useSubplebbit, useComment } from '@bitsocialhq/pkc-react-hooks';
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts'; import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { Virtuoso } from 'react-virtuoso'; import { Virtuoso } from 'react-virtuoso';
import styles from './mod-queue.module.css'; import styles from './mod-queue.module.css';
import useModQueueStore from '../../stores/use-mod-queue-store'; import useModQueueStore from '../../stores/use-mod-queue-store';
+1 -1
View File
@@ -1,6 +1,6 @@
import { useEffect } from 'react'; import { useEffect } from 'react';
import { useNavigate, useParams } from 'react-router-dom'; import { useNavigate, useParams } from 'react-router-dom';
import { useAccountComment, useAccountComments } from '@plebbit/plebbit-react-hooks'; import { useAccountComment, useAccountComments } from '@bitsocialhq/pkc-react-hooks';
import { useDirectories } from '../../hooks/use-directories'; import { useDirectories } from '../../hooks/use-directories';
import { getBoardPath } from '../../lib/utils/route-utils'; import { getBoardPath } from '../../lib/utils/route-utils';
import { Post } from '../post'; import { Post } from '../post';
+2 -2
View File
@@ -1,7 +1,7 @@
import { memo, useEffect, useMemo } from 'react'; import { memo, useEffect, useMemo } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Comment, Role, useComment, useEditedComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { Comment, Role, useComment, useEditedComment, useSubplebbit } from '@bitsocialhq/pkc-react-hooks';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages'; import useSubplebbitsPagesStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits-pages';
import { useSubplebbitField } from '../../hooks/use-stable-subplebbit'; import { useSubplebbitField } from '../../hooks/use-stable-subplebbit';
import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { isAllView } from '../../lib/utils/view-utils'; import { isAllView } from '../../lib/utils/view-utils';
+1 -1
View File
@@ -1,6 +1,6 @@
import { useEffect, useState, FormEvent } from 'react'; import { useEffect, useState, FormEvent } from 'react';
import { useNavigate, useParams } from 'react-router-dom'; import { useNavigate, useParams } from 'react-router-dom';
import { useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { useSubplebbit } from '@bitsocialhq/pkc-react-hooks';
import { Footer, HomeLogo } from '../home'; import { Footer, HomeLogo } from '../home';
import { useDirectories, DirectoryCommunity } from '../../hooks/use-directories'; import { useDirectories, DirectoryCommunity } from '../../hooks/use-directories';
import { getSubplebbitAddress, getBoardPath } from '../../lib/utils/route-utils'; import { getSubplebbitAddress, getBoardPath } from '../../lib/utils/route-utils';
+2 -2
View File
@@ -172,8 +172,8 @@ export default defineConfig({
if (/[\\/]node_modules[\\/](@plebbit[\\/]plebbit-js)[\\/]/.test(id)) { if (/[\\/]node_modules[\\/](@plebbit[\\/]plebbit-js)[\\/]/.test(id)) {
return 'plebbit-js'; return 'plebbit-js';
} }
if (/[\\/]node_modules[\\/](@plebbit[\\/]plebbit-react-hooks)[\\/]/.test(id)) { if (/[\\/]node_modules[\\/](@bitsocialhq[\\/]pkc-react-hooks)[\\/]/.test(id)) {
return 'plebbit-react-hooks'; return 'pkc-react-hooks';
} }
if (/[\\/]node_modules[\\/](@react-spring|@use-gesture)[\\/]/.test(id)) { if (/[\\/]node_modules[\\/](@react-spring|@use-gesture)[\\/]/.test(id)) {
return 'spring-gesture'; return 'spring-gesture';
+559 -867
View File
File diff suppressed because it is too large Load Diff