fix(post): show OP backlinks in board feed cards

This commit is contained in:
plebeius
2026-02-11 19:06:29 +08:00
parent 18cea185e7
commit 25375612a9
3 changed files with 2 additions and 5 deletions
@@ -440,7 +440,6 @@ const PostInfo = ({
)} )}
{cid && {cid &&
!parentCid && !parentCid &&
isInPostPageView &&
quotedByMap quotedByMap
?.get(cid) ?.get(cid)
?.map( ?.map(
+2 -3
View File
@@ -380,14 +380,13 @@ const PostMediaContent = ({ post, link }: { post: any; link: string }) => {
); );
}; };
const ReplyBacklinks = ({ post, quotedByMap, isInPostPageView }: PostProps) => { const ReplyBacklinks = ({ post, quotedByMap }: PostProps) => {
const { cid, parentCid } = post || {}; const { cid, parentCid } = post || {};
const { replies } = useReplies({ comment: post, flat: true, accountComments: { newerThan: Infinity } }); const { replies } = useReplies({ comment: post, flat: true, accountComments: { newerThan: Infinity } });
const opBacklinks = const opBacklinks =
cid && cid &&
!parentCid && !parentCid &&
isInPostPageView &&
quotedByMap quotedByMap
?.get(cid) ?.get(cid)
?.map( ?.map(
@@ -601,7 +600,7 @@ const PostMobile = ({
{shouldShowSnow() && <img src='assets/xmashat.gif' className={styles.xmasHat} alt='' />} {shouldShowSnow() && <img src='assets/xmashat.gif' className={styles.xmasHat} alt='' />}
<PostInfoAndMedia post={post} postReplyCount={replyCount} roles={roles} threadNumber={post?.number} /> <PostInfoAndMedia post={post} postReplyCount={replyCount} roles={roles} threadNumber={post?.number} />
<CommentContent comment={post} /> <CommentContent comment={post} />
<ReplyBacklinks post={post} quotedByMap={quotedByMap} isInPostPageView={isInPostView} /> <ReplyBacklinks post={post} quotedByMap={quotedByMap} />
</div> </div>
{!isInPostView && !isInPendingPostView && (showReplies || isModQueue) && ( {!isInPostView && !isInPendingPostView && (showReplies || isModQueue) && (
<div className={styles.postLink}> <div className={styles.postLink}>
-1
View File
@@ -32,7 +32,6 @@ export interface PostProps {
onApprove?: () => void; onApprove?: () => void;
onReject?: () => void; onReject?: () => void;
quotedByMap?: Map<string, Comment[]>; quotedByMap?: Map<string, Comment[]>;
isInPostPageView?: boolean;
} }
export const Post = ({ export const Post = ({