mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(flags): align board flag rendering (#1142)
* fix(flags): align board flag rendering * ci: run react doctor on changed pr files
This commit is contained in:
@@ -70,6 +70,7 @@ import { getThreadPostCountsByAuthor } from '../../lib/utils/author-post-counts'
|
||||
import { withResolvedCommentCommunityAddress } from '../../lib/utils/comment-utils';
|
||||
import { getFeedPostHeightEstimate, getReplyHeightEstimates, reportReplyHeightAuditSample } from '../../lib/utils/pretext-height-estimates';
|
||||
import { getAuthorBadge } from '../../lib/utils/author-display-utils';
|
||||
import { hasCommentFlagsForDirectory } from '../../lib/comment-flag-selection';
|
||||
|
||||
const { addChallenge } = useChallengesStore.getState();
|
||||
|
||||
@@ -242,7 +243,7 @@ const PostInfo = ({
|
||||
const directories = useDirectories();
|
||||
const directoryEntry = communityAddress ? findDirectoryByAddress(directories, communityAddress) : undefined;
|
||||
const boardPath = communityAddress ? getBoardPath(communityAddress, directories) : undefined;
|
||||
const showAuthorFlags = directoryEntry?.features?.hasFlags === true && !(deleted || removed || purged);
|
||||
const showAuthorFlags = hasCommentFlagsForDirectory(directoryEntry) && !(deleted || removed || purged);
|
||||
const postMenuProps = selectPostMenuProps(post);
|
||||
|
||||
const params = useParams();
|
||||
|
||||
@@ -59,6 +59,7 @@ import { getThreadPostCountsByAuthor } from '../../lib/utils/author-post-counts'
|
||||
import { withResolvedCommentCommunityAddress } from '../../lib/utils/comment-utils';
|
||||
import { getFeedPostHeightEstimate, getReplyHeightEstimates, reportReplyHeightAuditSample } from '../../lib/utils/pretext-height-estimates';
|
||||
import { getAuthorBadge } from '../../lib/utils/author-display-utils';
|
||||
import { hasCommentFlagsForDirectory } from '../../lib/comment-flag-selection';
|
||||
|
||||
const { addChallenge } = useChallengesStore.getState();
|
||||
|
||||
@@ -89,7 +90,7 @@ const PostInfoAndMedia = ({
|
||||
const purged = resolvedPost?.commentModeration?.purged;
|
||||
const boardPath = communityAddress ? getBoardPath(communityAddress, directories) : undefined;
|
||||
const directoryEntry = communityAddress ? findDirectoryByAddress(directories, communityAddress) : undefined;
|
||||
const showAuthorFlags = directoryEntry?.features?.hasFlags === true && !(deleted || removed || purged);
|
||||
const showAuthorFlags = hasCommentFlagsForDirectory(directoryEntry) && !(deleted || removed || purged);
|
||||
const displayBoardPath =
|
||||
boardPath && communityAddress
|
||||
? boardPath !== communityAddress
|
||||
|
||||
Reference in New Issue
Block a user