From e94335b611dcb287e1eecd9964e1d1e0f69fdcb4 Mon Sep 17 00:00:00 2001 From: Dmitriy <34593263+shelegdmitriy@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:52:32 +0300 Subject: [PATCH] Remove old report message (#196) --- src/AccountProfileOverlay.jsx | 6 +++--- src/Comments/Comment.jsx | 34 +++++++++++++------------------ src/NestedDiscussions/Preview.jsx | 34 +++++++++++++------------------ src/Posts/Post.jsx | 34 +++++++++++++------------------ src/ProfilePage/Sidebar.jsx | 11 +++++----- 5 files changed, 51 insertions(+), 68 deletions(-) diff --git a/src/AccountProfileOverlay.jsx b/src/AccountProfileOverlay.jsx index 21d6f7b8..2b71e020 100644 --- a/src/AccountProfileOverlay.jsx +++ b/src/AccountProfileOverlay.jsx @@ -115,10 +115,10 @@ return ( description: "Thanks for helping our Content Moderators. The item you flagged will be reviewed.", open: state.hasBeenFlagged, - onOpenChange: (open) => { - State.update({ hasBeenFlagged: open }); + onOpenChange: () => { + State.update({ hasBeenFlagged: false }); }, - duration: 10000, + duration: 5000 }} /> )} diff --git a/src/Comments/Comment.jsx b/src/Comments/Comment.jsx index 64addbfe..88b342cc 100644 --- a/src/Comments/Comment.jsx +++ b/src/Comments/Comment.jsx @@ -119,26 +119,20 @@ const Actions = styled.div` if (state.hasBeenFlagged) { return ( - <> -
- This content has been flagged for - moderation -
- { - State.update({ hasBeenFlagged: open }); - }, - duration: 10000, - }} - /> - + { + State.update({ hasBeenFlagged: false }); + }, + duration: 5000, + }} + /> ); } diff --git a/src/NestedDiscussions/Preview.jsx b/src/NestedDiscussions/Preview.jsx index 738015ea..85ebb4c1 100644 --- a/src/NestedDiscussions/Preview.jsx +++ b/src/NestedDiscussions/Preview.jsx @@ -90,26 +90,20 @@ const Comments = styled.div` if (state.hasBeenFlagged) { return ( - <> -
- This content has been flagged for - moderation -
- { - State.update({ hasBeenFlagged: open }); - }, - duration: 10000, - }} - /> - + { + State.update({ hasBeenFlagged: false }); + }, + duration: 5000, + }} + /> ); } diff --git a/src/Posts/Post.jsx b/src/Posts/Post.jsx index 7c0621bc..4f0dc4d7 100644 --- a/src/Posts/Post.jsx +++ b/src/Posts/Post.jsx @@ -190,26 +190,20 @@ const renderComment = (a) => { if (state.hasBeenFlagged) { return ( - <> -
- This content has been flagged for - moderation -
- { - State.update({ hasBeenFlagged: open }); - }, - duration: 10000, - }} - /> - + { + State.update({ hasBeenFlagged: false }); + }, + duration: 5000, + }} + /> ); } diff --git a/src/ProfilePage/Sidebar.jsx b/src/ProfilePage/Sidebar.jsx index c294a381..bd90fd85 100644 --- a/src/ProfilePage/Sidebar.jsx +++ b/src/ProfilePage/Sidebar.jsx @@ -258,12 +258,13 @@ return ( props={{ type: "info", title: "Flagged for moderation", - description: "Thanks for helping our Content Moderators. The item you flagged will be reviewed.", + description: + "Thanks for helping our Content Moderators. The item you flagged will be reviewed.", open: state.hasBeenFlagged, - onOpenChange: (open) => { - State.update({ hasBeenFlagged: open }); + onOpenChange: () => { + State.update({ hasBeenFlagged: false }); }, - duration: 10000, + duration: 5000, trigger: (
- ) + ), }} /> )}