mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(reply-quote-preview): keep floating OP previews at desktop width
This commit is contained in:
@@ -260,6 +260,10 @@ const ExternalNumberQuoteLink = ({ reference }: ExternalNumberQuoteLinkProps) =>
|
||||
) : (
|
||||
<div className={`${styles.externalQuotePreviewState} ${styles.externalQuotePreviewError}`}>{previewState.message}</div>
|
||||
);
|
||||
const previewClassName =
|
||||
previewState.kind === 'resolved' && previewState.target.comment && !previewState.target.comment.parentCid
|
||||
? `${postStyles.replyQuotePreview} ${postStyles.replyQuotePreviewOp}`
|
||||
: postStyles.replyQuotePreview;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -280,7 +284,7 @@ const ExternalNumberQuoteLink = ({ reference }: ExternalNumberQuoteLinkProps) =>
|
||||
previewContent &&
|
||||
createPortal(
|
||||
<div
|
||||
className={postStyles.replyQuotePreview}
|
||||
className={previewClassName}
|
||||
data-thread-scroll-preview='true'
|
||||
ref={previewRef}
|
||||
style={{ left: previewPosition.left, position: 'fixed', top: previewPosition.top, zIndex: 1000 }}
|
||||
|
||||
Reference in New Issue
Block a user