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>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user