mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): show OP backlinks in board feed cards
This commit is contained in:
@@ -440,7 +440,6 @@ const PostInfo = ({
|
|||||||
)}
|
)}
|
||||||
{cid &&
|
{cid &&
|
||||||
!parentCid &&
|
!parentCid &&
|
||||||
isInPostPageView &&
|
|
||||||
quotedByMap
|
quotedByMap
|
||||||
?.get(cid)
|
?.get(cid)
|
||||||
?.map(
|
?.map(
|
||||||
|
|||||||
@@ -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}>
|
||||||
|
|||||||
@@ -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 = ({
|
||||||
|
|||||||
Reference in New Issue
Block a user