mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor(core): remove legacy plebbit terminology
This commit is contained in:
@@ -39,7 +39,7 @@ vi.mock('../../../hooks/use-directories', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('../../../lib/utils/route-utils', () => ({
|
||||
getSubplebbitAddress: () => testState.communityAddress,
|
||||
getCommunityAddress: () => testState.communityAddress,
|
||||
}));
|
||||
|
||||
vi.mock('../../home', () => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { useCommunityField } from '../../hooks/use-stable-community';
|
||||
import { useDirectories } from '../../hooks/use-directories';
|
||||
import { getSubplebbitAddress } from '../../lib/utils/route-utils';
|
||||
import { getCommunityAddress } from '../../lib/utils/route-utils';
|
||||
import { HomeLogo } from '../home';
|
||||
import NotFoundImage from '../../components/not-found-image';
|
||||
import styles from './not-found.module.css';
|
||||
@@ -12,7 +12,7 @@ const NotFound = () => {
|
||||
const pathParts = location.pathname.split('/').filter(Boolean);
|
||||
const boardIdentifier = pathParts[0] && pathParts[0] !== 'not-found' && pathParts[0] !== 'faq' ? pathParts[0] : '';
|
||||
const directories = useDirectories();
|
||||
const communityAddress = boardIdentifier ? getSubplebbitAddress(boardIdentifier, directories) : '';
|
||||
const communityAddress = boardIdentifier ? getCommunityAddress(boardIdentifier, directories) : '';
|
||||
// Only subscribe to address and shortAddress to avoid rerenders from updatingState changes
|
||||
const address = useCommunityField(communityAddress, (community) => community?.address);
|
||||
const shortAddress = useCommunityField(communityAddress, (community) => community?.shortAddress);
|
||||
|
||||
Reference in New Issue
Block a user