diff --git a/src/components/views/All.jsx b/src/components/views/All.jsx
index 414322c7..17628cac 100755
--- a/src/components/views/All.jsx
+++ b/src/components/views/All.jsx
@@ -337,8 +337,8 @@ const All = () => {
const { publishCommentEdit } = usePublishCommentEdit(publishCommentEditOptions);
- const handleAuthorDeleteClick = (comment) => {
- handleOptionClick(comment.cid);
+ const handleAuthorDeleteClick = (cid) => {
+ handleOptionClick(cid);
confirmAlert({
customUI: ({ onClose }) => {
@@ -352,7 +352,7 @@ const All = () => {
onClick={() => {
setIsAuthorDelete(true);
setIsAuthorEdit(false);
- setCommentCid(comment.cid);
+ setCommentCid(cid);
setPublishCommentEditOptions(prevOptions => ({
...prevOptions,
deleted: true,
@@ -746,7 +746,7 @@ const All = () => {
{thread.author.shortAddress === account?.author.shortAddress ? (
<>
{handleAuthorEditClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Edit post
- {handleAuthorDeleteClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
+ {handleAuthorDeleteClick(thread.cid); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
>
) : null}
{isModerator ? (
@@ -1026,7 +1026,7 @@ const All = () => {
{reply.author.shortAddress === account?.author.shortAddress ? (
<>
{handleAuthorEditClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Edit post
- {handleAuthorDeleteClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
+ {handleAuthorDeleteClick(reply.cid); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
>
) : null}
{isModerator ? (
diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx
index c103496b..06b9b334 100755
--- a/src/components/views/Board.jsx
+++ b/src/components/views/Board.jsx
@@ -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 ? (
<>
handleAuthorEditClick(thread)}>Edit post
- handleAuthorDeleteClick(thread)}>Delete post
+ handleAuthorDeleteClick(thread.cid)}>Delete post
>
) : null}
{isModerator ? (
@@ -1453,7 +1453,7 @@ const Board = () => {
{reply.author.shortAddress === account?.author.shortAddress ? (
<>
handleAuthorEditClick(reply)}>Edit post
- handleAuthorDeleteClick(reply)}>Delete post
+ handleAuthorDeleteClick(reply.cid)}>Delete post
>
) : null}
{isModerator ? (
diff --git a/src/components/views/Subscriptions.jsx b/src/components/views/Subscriptions.jsx
index 9df97290..0559edcc 100755
--- a/src/components/views/Subscriptions.jsx
+++ b/src/components/views/Subscriptions.jsx
@@ -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 ? (
<>
{handleAuthorEditClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Edit post
- {handleAuthorDeleteClick(thread); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
+ {handleAuthorDeleteClick(thread.cid); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
>
) : null}
{isModerator ? (
@@ -1036,7 +1036,7 @@ const Subscriptions = () => {
{reply.author.shortAddress === account?.author.shortAddress ? (
<>
{handleAuthorEditClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Edit post
- {handleAuthorDeleteClick(reply); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
+ {handleAuthorDeleteClick(reply.cid); setSelectedAddress(thread.subplebbitAddress);}}>Delete post
>
) : null}
{isModerator ? (
diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx
index 65e20740..a95de4c8 100755
--- a/src/components/views/Thread.jsx
+++ b/src/components/views/Thread.jsx
@@ -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 ? (
<>
handleAuthorEditClick(comment)}>Edit post
- handleAuthorDeleteClick(comment)}>Delete post
+ handleAuthorDeleteClick(comment.cid)}>Delete post
>
) : null}
{isModerator ? (
@@ -1102,7 +1102,7 @@ const Thread = () => {
{reply.author.shortAddress === account?.author.shortAddress ? (
<>
handleAuthorEditClick(reply)}>Edit post
- handleAuthorDeleteClick(reply)}>Delete post
+ handleAuthorDeleteClick(reply.cid)}>Delete post
>
) : null}
{isModerator ? (