fix prop syntax error

This commit is contained in:
plebbitor
2023-04-14 16:42:09 +02:00
parent 2b72ec6841
commit a0066a1a3b
3 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -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>
),
}}
/>