Skip to content

Commit

Permalink
Remove old report message (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
shelegdmitriy authored Aug 30, 2023
1 parent bfaf2eb commit e94335b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 68 deletions.
6 changes: 3 additions & 3 deletions src/AccountProfileOverlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}}
/>
)}
Expand Down
34 changes: 14 additions & 20 deletions src/Comments/Comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,20 @@ const Actions = styled.div`

if (state.hasBeenFlagged) {
return (
<>
<div className="alert alert-secondary">
<i className="bi bi-flag" /> This content has been flagged for
moderation
</div>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: (open) => {
State.update({ hasBeenFlagged: open });
},
duration: 10000,
}}
/>
</>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: () => {
State.update({ hasBeenFlagged: false });
},
duration: 5000,
}}
/>
);
}

Expand Down
34 changes: 14 additions & 20 deletions src/NestedDiscussions/Preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,20 @@ const Comments = styled.div`

if (state.hasBeenFlagged) {
return (
<>
<div className="alert alert-secondary">
<i className="bi bi-flag" /> This content has been flagged for
moderation
</div>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: (open) => {
State.update({ hasBeenFlagged: open });
},
duration: 10000,
}}
/>
</>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: () => {
State.update({ hasBeenFlagged: false });
},
duration: 5000,
}}
/>
);
}

Expand Down
34 changes: 14 additions & 20 deletions src/Posts/Post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,26 +190,20 @@ const renderComment = (a) => {

if (state.hasBeenFlagged) {
return (
<>
<div className="alert alert-secondary">
<i className="bi bi-flag" /> This content has been flagged for
moderation
</div>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: (open) => {
State.update({ hasBeenFlagged: open });
},
duration: 10000,
}}
/>
</>
<Widget
src={`${REPL_ACCOUNT}/widget/DIG.Toast`}
props={{
type: "info",
title: "Flagged for moderation",
description:
"Thanks for helping our Content Moderators. The item you flagged will be reviewed.",
open: state.hasBeenFlagged,
onOpenChange: () => {
State.update({ hasBeenFlagged: false });
},
duration: 5000,
}}
/>
);
}

Expand Down
11 changes: 6 additions & 5 deletions src/ProfilePage/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
<div className="d-inline-block ms-auto">
<Widget
Expand All @@ -276,7 +277,7 @@ return (
}}
/>
</div>
)
),
}}
/>
)}
Expand Down

0 comments on commit e94335b

Please sign in to comment.