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
@@ -37,7 +37,6 @@ type TestComment = {
};
spoiler?: boolean;
communityAddress?: string;
subplebbitAddress?: string;
thumbnailUrl?: string;
timestamp?: number;
title?: string;
@@ -275,7 +274,7 @@ describe('CatalogRow', () => {
},
content: 'Archived thread',
replyCount: 3,
subplebbitAddress: 'music-posting.eth',
communityAddress: 'music-posting.eth',
title: 'Old thread',
};
@@ -422,14 +421,14 @@ describe('CatalogRow', () => {
{
author: { address: 'author-2', displayName: 'Bob' },
cid: 'reply-legacy',
subplebbitAddress: 'music-posting.eth',
communityAddress: 'music-posting.eth',
timestamp: 200,
},
],
},
},
},
subplebbitAddress: 'music-posting.eth',
communityAddress: 'music-posting.eth',
timestamp: 100,
title: 'Legacy title',
};
+3 -3
View File
@@ -23,7 +23,7 @@ import PostMenuDesktop from '../post-desktop/post-menu-desktop';
import styles from './catalog-row.module.css';
import capitalize from 'lodash/capitalize';
import { selectPostMenuProps } from '../../lib/utils/post-menu-props';
import { withResolvedCommentCommunityAddress } from '../../lib/utils/comment-utils';
import { getCommentCommunityAddress, withResolvedCommentCommunityAddress } from '../../lib/utils/comment-utils';
interface CatalogPostMediaProps {
cid: string;
@@ -325,8 +325,8 @@ const CatalogPost = memo(
(prevProps, nextProps) => {
const prev = prevProps.post;
const next = nextProps.post;
const prevCommunityAddress = prev?.communityAddress ?? prev?.subplebbitAddress;
const nextCommunityAddress = next?.communityAddress ?? next?.subplebbitAddress;
const prevCommunityAddress = getCommentCommunityAddress(prev);
const nextCommunityAddress = getCommentCommunityAddress(next);
// Compare all fields that affect rendering to avoid stale displays
return (
prev?.cid === next?.cid &&