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