refactor(core): remove legacy plebbit terminology

This commit is contained in:
Tommaso Casaburi
2026-04-17 10:48:27 +07:00
parent e366dac25c
commit ee7a5b5778
158 changed files with 626 additions and 836 deletions
@@ -39,7 +39,7 @@ vi.mock('../../../hooks/use-directories', () => ({
}));
vi.mock('../../../lib/utils/route-utils', () => ({
getSubplebbitAddress: () => testState.communityAddress,
getCommunityAddress: () => testState.communityAddress,
}));
vi.mock('../../home', () => ({
+2 -2
View File
@@ -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);