mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix refs
This commit is contained in:
@@ -868,14 +868,14 @@ const All = () => {
|
||||
<blockquote key={`pm-${index}`} comment={reply} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
@@ -921,14 +921,14 @@ const All = () => {
|
||||
: <blockquote key={`pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
|
||||
@@ -1353,14 +1353,14 @@ const Board = () => {
|
||||
<blockquote key={`pm-${index}`} comment={reply} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
@@ -1413,14 +1413,14 @@ const Board = () => {
|
||||
: <blockquote key={`pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
@@ -1751,14 +1751,14 @@ const Board = () => {
|
||||
<blockquote key={`mob-pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefsMobile.current[shortParentCid] = el;
|
||||
quoteRefsMobile.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefsMobile.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefsMobile.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
@@ -1811,14 +1811,14 @@ const Board = () => {
|
||||
: <blockquote key={`mob-pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`mob-r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefsMobile.current[shortParentCid] = el;
|
||||
quoteRefsMobile.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefsMobile.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefsMobile.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
|
||||
@@ -875,14 +875,14 @@ const Subscriptions = () => {
|
||||
<blockquote key={`pm-${index}`} comment={reply} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
@@ -928,14 +928,14 @@ const Subscriptions = () => {
|
||||
: <blockquote key={`pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} key={`r-pm-${index}`} className="quotelink"
|
||||
ref={el => {
|
||||
quoteRefs.current[shortParentCid] = el;
|
||||
quoteRefs.current[reply.cid] = el;
|
||||
}}
|
||||
onClick={(event) => handleQuoteClick(reply, shortParentCid, event)}
|
||||
onMouseOver={(event) => {
|
||||
event.stopPropagation();
|
||||
handleQuoteHover(reply, shortParentCid, () => {
|
||||
setOutOfViewCid(reply.parentCid);
|
||||
const rect = quoteRefs.current[shortParentCid].getBoundingClientRect();
|
||||
const rect = quoteRefs.current[reply.cid].getBoundingClientRect();
|
||||
const distanceToRight = window.innerWidth - rect.right;
|
||||
const distanceToTop = rect.top;
|
||||
const distanceToBottom = window.innerHeight - rect.bottom;
|
||||
|
||||
Reference in New Issue
Block a user