From de1d09116c094b29be3e51f1c17afaffe262fbcf Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 9 Mar 2024 15:54:56 +0100 Subject: [PATCH] Update mod-menu.tsx --- src/components/post/comment-tools/mod-menu/mod-menu.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/post/comment-tools/mod-menu/mod-menu.tsx b/src/components/post/comment-tools/mod-menu/mod-menu.tsx index ef6ae24c..8b09e472 100644 --- a/src/components/post/comment-tools/mod-menu/mod-menu.tsx +++ b/src/components/post/comment-tools/mod-menu/mod-menu.tsx @@ -32,7 +32,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => { locked: post?.locked, spoiler: post?.spoiler, pinned: post?.pinned, - banExpiresAt: post?.banExpiresAt, + commentAuthor: { banExpiresAt: post?.banExpiresAt }, commentCid: post?.cid, subplebbitAddress: post?.subplebbitAddress, onChallenge: (...args: any) => addChallenge([...args, post]), @@ -59,7 +59,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => { if (id === 'banUser') { setPublishCommentEditOptions((state) => ({ ...state, - banExpiresAt: checked ? daysToTimestampInSeconds(banDuration) : undefined, + commentAuthor: { ...state.commentAuthor, banExpiresAt: checked ? daysToTimestampInSeconds(banDuration) : undefined }, })); } else { setPublishCommentEditOptions((state) => ({ ...state, [id]: checked })); @@ -71,7 +71,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => { setBanDuration(days); setPublishCommentEditOptions((state) => ({ ...state, - banExpiresAt: daysToTimestampInSeconds(days), + commentAuthor: { ...state.commentAuthor, banExpiresAt: daysToTimestampInSeconds(days) }, })); }; @@ -137,7 +137,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => { {!isCommentAuthorMod && (