mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix prop syntax error
This commit is contained in:
@@ -25,7 +25,7 @@ const blockquoteToGreentext = () => (tree) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const createQuotelink = (handleQuoteClick, comment, children) => {
|
const createQuotelink = (handlequoteclick, comment, children) => {
|
||||||
const text = children.map((child) => (typeof child === 'string' ? child : child.props.children)).join('');
|
const text = children.map((child) => (typeof child === 'string' ? child : child.props.children)).join('');
|
||||||
const regex = /(\s|^)(c\/[A-Za-z0-9]{12}|c\/[A-Za-z0-9]{45})(?=\s|$)/g;
|
const regex = /(\s|^)(c\/[A-Za-z0-9]{12}|c\/[A-Za-z0-9]{45})(?=\s|$)/g;
|
||||||
const parts = text.split(regex);
|
const parts = text.split(regex);
|
||||||
@@ -37,7 +37,7 @@ const createQuotelink = (handleQuoteClick, comment, children) => {
|
|||||||
key={`link-${i}`}
|
key={`link-${i}`}
|
||||||
className="quotelink"
|
className="quotelink"
|
||||||
to=""
|
to=""
|
||||||
onClick={handleQuoteClick}
|
onClick={handlequoteclick}
|
||||||
>
|
>
|
||||||
{part.trim()}
|
{part.trim()}
|
||||||
</Link>,
|
</Link>,
|
||||||
@@ -49,7 +49,7 @@ const createQuotelink = (handleQuoteClick, comment, children) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const Post = ({ content, handleQuoteClick, comment }) => {
|
const Post = ({ content, handlequoteclick, comment }) => {
|
||||||
const sanitizedContent = DOMPurify.sanitize(content);
|
const sanitizedContent = DOMPurify.sanitize(content);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -62,7 +62,7 @@ const Post = ({ content, handleQuoteClick, comment }) => {
|
|||||||
source: () => null,
|
source: () => null,
|
||||||
gif: () => null,
|
gif: () => null,
|
||||||
p: ({ children }) => (
|
p: ({ children }) => (
|
||||||
<p>{createQuotelink(handleQuoteClick, comment, children)}</p>
|
<p>{createQuotelink(handlequoteclick, comment, children)}</p>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -620,8 +620,8 @@ const Board = () => {
|
|||||||
{reply.content ? (
|
{reply.content ? (
|
||||||
reply.content.length > 500 ?
|
reply.content.length > 500 ?
|
||||||
<Fragment key={`fragment8-${reply.cid}`}>
|
<Fragment key={`fragment8-${reply.cid}`}>
|
||||||
<blockquote key={`pm-${reply.cid}`} handleQuoteClick={handleQuoteClick} comment={reply} className="post-message">
|
<blockquote key={`pm-${reply.cid}`} comment={reply} className="post-message">
|
||||||
<Post content={reply.content.slice(0, 500)} key={`post-${reply.cid}`} />
|
<Post content={reply.content.slice(0, 500)} key={`post-${reply.cid}`} handlequoteclick={handleQuoteClick} />
|
||||||
<span key={`ttl-s-${reply.cid}`} className="ttl"> (...)
|
<span key={`ttl-s-${reply.cid}`} className="ttl"> (...)
|
||||||
<br key={`ttl-s-br1-${reply.cid}`} /><br key={`ttl-s-br2${reply.cid}`} />
|
<br key={`ttl-s-br1-${reply.cid}`} /><br key={`ttl-s-br2${reply.cid}`} />
|
||||||
Comment too long.
|
Comment too long.
|
||||||
@@ -630,7 +630,7 @@ const Board = () => {
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
: <blockquote key={`pm-${reply.cid}`} className="post-message">
|
: <blockquote key={`pm-${reply.cid}`} className="post-message">
|
||||||
<Post content={reply.content} key={`post-${reply.cid}`} handleQuoteClick={handleQuoteClick} comment={reply} />
|
<Post content={reply.content} key={`post-${reply.cid}`} handlequoteclick={handleQuoteClick} comment={reply} />
|
||||||
</blockquote>)
|
</blockquote>)
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
@@ -825,7 +825,7 @@ const Board = () => {
|
|||||||
reply.content.length > 500 ?
|
reply.content.length > 500 ?
|
||||||
<Fragment key={`fragment15-${reply.cid}`}>
|
<Fragment key={`fragment15-${reply.cid}`}>
|
||||||
<blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
<blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
||||||
<Post content={reply.content.slice(0, 500)} key={`post-mobile-${reply.cid}`} handleQuoteClick={handleQuoteClick} comment={reply} />
|
<Post content={reply.content.slice(0, 500)} key={`post-mobile-${reply.cid}`} handlequoteclick={handleQuoteClick} comment={reply} />
|
||||||
<span key={`mob-ttl-s-${reply.cid}`} className="ttl"> (...)
|
<span key={`mob-ttl-s-${reply.cid}`} className="ttl"> (...)
|
||||||
<br key={`mob-ttl-s-br1-${reply.cid}`} /><br key={`mob-ttl-s-br2${reply.cid}`} />
|
<br key={`mob-ttl-s-br1-${reply.cid}`} /><br key={`mob-ttl-s-br2${reply.cid}`} />
|
||||||
Comment too long.
|
Comment too long.
|
||||||
@@ -834,7 +834,7 @@ const Board = () => {
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
: <blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
: <blockquote key={`mob-pm-${reply.cid}`} className="post-message">
|
||||||
<Post content={reply.content} key={`post-mobile-${reply.cid}`} handleQuoteClick={handleQuoteClick} comment={reply} />
|
<Post content={reply.content} key={`post-mobile-${reply.cid}`} handlequoteclick={handleQuoteClick} comment={reply} />
|
||||||
</blockquote>)
|
</blockquote>)
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ const Thread = () => {
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<blockquote key={`blockquote-${comment.cid}`}>
|
<blockquote key={`blockquote-${comment.cid}`}>
|
||||||
<Post content={comment.content} handleQuoteClick={handleQuoteClick} comment={comment} key={`post-${comment.cid}`} />
|
<Post content={comment.content} handlequoteclick={handleQuoteClick} comment={comment} key={`post-${comment.cid}`} />
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -608,7 +608,7 @@ const Thread = () => {
|
|||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<blockquote key={`pm-${reply.cid}`} className="post-message">
|
<blockquote key={`pm-${reply.cid}`} className="post-message">
|
||||||
<Post content={reply.content} comment={reply} handleQuoteClick={handleQuoteClick} key={`post-${reply.cid}`} />
|
<Post content={reply.content} comment={reply} handlequoteclick={handleQuoteClick} key={`post-${reply.cid}`} />
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -703,7 +703,7 @@ const Thread = () => {
|
|||||||
<blockquote key={`mob-bq-${comment.cid}`} className="post-message-mobile">
|
<blockquote key={`mob-bq-${comment.cid}`} className="post-message-mobile">
|
||||||
{comment.content ? (
|
{comment.content ? (
|
||||||
<>
|
<>
|
||||||
<Post content={comment.content} handleQuoteClick={handleQuoteClick} comment={comment} key={`post-mobile-${comment.cid}`} />
|
<Post content={comment.content} handlequoteclick={handleQuoteClick} comment={comment} key={`post-mobile-${comment.cid}`} />
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
@@ -753,7 +753,7 @@ const Thread = () => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<blockquote key={`mob-pm-${reply.cid}`} className="post-message-mobile">
|
<blockquote key={`mob-pm-${reply.cid}`} className="post-message-mobile">
|
||||||
<Post content={reply.content} comment={reply} handleQuoteClick={handleQuoteClick} key={`post-mobile-${reply.cid}`} />
|
<Post content={reply.content} comment={reply} handlequoteclick={handleQuoteClick} key={`post-mobile-${reply.cid}`} />
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user