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 regex = /(\s|^)(c\/[A-Za-z0-9]{12}|c\/[A-Za-z0-9]{45})(?=\s|$)/g;
|
||||
const parts = text.split(regex);
|
||||
@@ -37,7 +37,7 @@ const createQuotelink = (handleQuoteClick, comment, children) => {
|
||||
key={`link-${i}`}
|
||||
className="quotelink"
|
||||
to=""
|
||||
onClick={handleQuoteClick}
|
||||
onClick={handlequoteclick}
|
||||
>
|
||||
{part.trim()}
|
||||
</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);
|
||||
|
||||
return (
|
||||
@@ -62,7 +62,7 @@ const Post = ({ content, handleQuoteClick, comment }) => {
|
||||
source: () => null,
|
||||
gif: () => null,
|
||||
p: ({ children }) => (
|
||||
<p>{createQuotelink(handleQuoteClick, comment, children)}</p>
|
||||
<p>{createQuotelink(handlequoteclick, comment, children)}</p>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -620,8 +620,8 @@ const Board = () => {
|
||||
{reply.content ? (
|
||||
reply.content.length > 500 ?
|
||||
<Fragment key={`fragment8-${reply.cid}`}>
|
||||
<blockquote key={`pm-${reply.cid}`} handleQuoteClick={handleQuoteClick} comment={reply} className="post-message">
|
||||
<Post content={reply.content.slice(0, 500)} key={`post-${reply.cid}`} />
|
||||
<blockquote key={`pm-${reply.cid}`} comment={reply} className="post-message">
|
||||
<Post content={reply.content.slice(0, 500)} key={`post-${reply.cid}`} handlequoteclick={handleQuoteClick} />
|
||||
<span key={`ttl-s-${reply.cid}`} className="ttl"> (...)
|
||||
<br key={`ttl-s-br1-${reply.cid}`} /><br key={`ttl-s-br2${reply.cid}`} />
|
||||
Comment too long.
|
||||
@@ -630,7 +630,7 @@ const Board = () => {
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <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>)
|
||||
: null}
|
||||
</div>
|
||||
@@ -825,7 +825,7 @@ const Board = () => {
|
||||
reply.content.length > 500 ?
|
||||
<Fragment key={`fragment15-${reply.cid}`}>
|
||||
<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"> (...)
|
||||
<br key={`mob-ttl-s-br1-${reply.cid}`} /><br key={`mob-ttl-s-br2${reply.cid}`} />
|
||||
Comment too long.
|
||||
@@ -834,7 +834,7 @@ const Board = () => {
|
||||
</blockquote>
|
||||
</Fragment>
|
||||
: <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>)
|
||||
: null}
|
||||
</div>
|
||||
|
||||
@@ -496,7 +496,7 @@ const Thread = () => {
|
||||
</div>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -608,7 +608,7 @@ const Thread = () => {
|
||||
</div>
|
||||
) : null}
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -703,7 +703,7 @@ const Thread = () => {
|
||||
<blockquote key={`mob-bq-${comment.cid}`} className="post-message-mobile">
|
||||
{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}
|
||||
</blockquote>
|
||||
@@ -753,7 +753,7 @@ const Thread = () => {
|
||||
</span>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user