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
@@ -434,8 +434,8 @@ const Board = () => {
const { publishCommentEdit } = usePublishCommentEdit(publishCommentEditOptions);
const handleAuthorDeleteClick = (comment) => {
handleOptionClick(comment.cid);
const handleAuthorDeleteClick = (cid) => {
handleOptionClick(cid);
confirmAlert({
customUI: ({ onClose }) => {
@@ -449,7 +449,7 @@ const Board = () => {
onClick={() => {
setIsAuthorDelete(true);
setIsAuthorEdit(false);
setCommentCid(comment.cid);
setCommentCid(cid);
setPublishCommentEditOptions(prevOptions => ({
...prevOptions,
deleted: true,
@@ -1192,7 +1192,7 @@ const Board = () => {
{thread.author.shortAddress === account?.author.shortAddress ? (
<>
<li onClick={() => handleAuthorEditClick(thread)}>Edit post</li>
<li onClick={() => handleAuthorDeleteClick(thread)}>Delete post</li>
<li onClick={() => handleAuthorDeleteClick(thread.cid)}>Delete post</li>
</>
) : null}
{isModerator ? (
@@ -1453,7 +1453,7 @@ const Board = () => {
{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 ? (