fix author delete edit

This commit is contained in:
plebeius.eth
2023-06-18 10:56:14 +02:00
parent 52c8222829
commit f2bf1438d1
4 changed files with 20 additions and 20 deletions
+5 -5
View File
@@ -401,8 +401,8 @@ const Thread = () => {
const { publishCommentEdit } = usePublishCommentEdit(publishCommentEditOptions);
const handleAuthorDeleteClick = (comment) => {
handleOptionClick(comment.cid);
const handleAuthorDeleteClick = (cid) => {
handleOptionClick(cid);
confirmAlert({
customUI: ({ onClose }) => {
@@ -416,7 +416,7 @@ const Thread = () => {
onClick={() => {
setIsAuthorDelete(true);
setIsAuthorEdit(false);
setCommentCid(comment.cid);
setCommentCid(cid);
setPublishCommentEditOptions(prevOptions => ({
...prevOptions,
deleted: true,
@@ -879,7 +879,7 @@ const Thread = () => {
{comment.author?.shortAddress === account?.author.shortAddress ? (
<>
<li onClick={() => handleAuthorEditClick(comment)}>Edit post</li>
<li onClick={() => handleAuthorDeleteClick(comment)}>Delete post</li>
<li onClick={() => handleAuthorDeleteClick(comment.cid)}>Delete post</li>
</>
) : null}
{isModerator ? (
@@ -1102,7 +1102,7 @@ const Thread = () => {
{reply.author.shortAddress === account?.author.shortAddress ? (
<>
<li onClick={() => handleAuthorEditClick(reply)}>Edit post</li>
<li onClick={() => handleAuthorDeleteClick(reply)}>Delete post</li>
<li onClick={() => handleAuthorDeleteClick(reply.cid)}>Delete post</li>
</>
) : null}
{isModerator ? (