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:
@@ -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',
|
||||
};
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user