From c622d523965c84799a0bfcedf83f1c0a10c4ac2c Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 9 Oct 2018 10:15:08 -0400 Subject: [PATCH 1/8] Pass the topLevelCommentId to make sure nested comment deleting works --- src/redux/preview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redux/preview.js b/src/redux/preview.js index a151fe41c..318f578d1 100644 --- a/src/redux/preview.js +++ b/src/redux/preview.js @@ -611,7 +611,7 @@ module.exports.updateProject = (id, jsonData, username, token) => (dispatch => { }); }); -module.exports.deleteComment = (projectId, commentId, token) => (dispatch => { +module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => { /* TODO fetching/fetched/error states updates for comment deleting */ api({ uri: `/proxy/comments/project/${projectId}`, @@ -627,7 +627,7 @@ module.exports.deleteComment = (projectId, commentId, token) => (dispatch => { log.error(err || res.body); return; } - dispatch(module.exports.setCommentDeleted(commentId)); + dispatch(module.exports.setCommentDeleted(commentId, topLevelCommentId)); }); }); From bdde34ba265e6fb85cac28dc42c922d44f048f97 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 9 Oct 2018 11:38:24 -0400 Subject: [PATCH 2/8] Implement report action with modal flow --- .../modal/comments/delete-comment.jsx | 81 ++++++++++++++++++ src/components/modal/comments/modal.scss | 44 ++++++++++ .../modal/comments/report-comment.jsx | 84 +++++++++++++++++++ src/redux/preview.js | 39 +++++++-- src/views/preview/comment/comment.jsx | 73 +++++++++++++++- src/views/preview/comment/comment.scss | 2 +- .../preview/comment/top-level-comment.jsx | 30 ++++++- src/views/preview/l10n.json | 10 ++- src/views/preview/presentation.jsx | 4 + src/views/preview/preview.jsx | 9 ++ 10 files changed, 362 insertions(+), 14 deletions(-) create mode 100644 src/components/modal/comments/delete-comment.jsx create mode 100644 src/components/modal/comments/modal.scss create mode 100644 src/components/modal/comments/report-comment.jsx diff --git a/src/components/modal/comments/delete-comment.jsx b/src/components/modal/comments/delete-comment.jsx new file mode 100644 index 000000000..0d2264854 --- /dev/null +++ b/src/components/modal/comments/delete-comment.jsx @@ -0,0 +1,81 @@ +const PropTypes = require('prop-types'); +const React = require('react'); +const FormattedMessage = require('react-intl').FormattedMessage; +const injectIntl = require('react-intl').injectIntl; +const intlShape = require('react-intl').intlShape; +const Modal = require('../base/modal.jsx'); + +const Button = require('../../forms/button.jsx'); +const FlexRow = require('../../flex-row/flex-row.jsx'); + +require('../../forms/button.scss'); +require('./modal.scss'); + +const DeleteModal = ({ + intl, + onDelete, + onReport, + onRequestClose, + ...modalProps +}) => ( + +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+ + + +
+
+
+
+); + + +DeleteModal.propTypes = { + intl: intlShape, + onDelete: PropTypes.func, + onReport: PropTypes.func, + onRequestClose: PropTypes.func +}; + +module.exports = injectIntl(DeleteModal); diff --git a/src/components/modal/comments/modal.scss b/src/components/modal/comments/modal.scss new file mode 100644 index 000000000..40a526fe3 --- /dev/null +++ b/src/components/modal/comments/modal.scss @@ -0,0 +1,44 @@ +@import "../../../colors"; +@import "../../../frameless"; + +$medium-and-small: "screen and (max-width : #{$tablet}-1)"; + +.mod-report * { + box-sizing: border-box; +} + +.mod-report { + margin: 100px auto; + outline: none; + padding: 0; + width: 36.25rem; /* 580px; */ + user-select: none; +} + +.report-modal-header { + border-radius: 1rem 1rem 0 0; + box-shadow: inset 0 -1px 0 0 $ui-coral-dark; + background-color: $ui-coral; + padding-top: .75rem; + width: 100%; + height: 3rem; + box-sizing: border-box; +} + +.report-content-label { + text-align: center; + color: $type-white; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 1rem; + font-weight: bold; +} + +.report-modal-content { + margin: 1rem auto; + width: 80%; + font-size: .875rem; + + .instructions { + line-height: 1.5rem; + } +} diff --git a/src/components/modal/comments/report-comment.jsx b/src/components/modal/comments/report-comment.jsx new file mode 100644 index 000000000..197484dfe --- /dev/null +++ b/src/components/modal/comments/report-comment.jsx @@ -0,0 +1,84 @@ +const PropTypes = require('prop-types'); +const React = require('react'); +const FormattedMessage = require('react-intl').FormattedMessage; +const injectIntl = require('react-intl').injectIntl; +const intlShape = require('react-intl').intlShape; +const Modal = require('../base/modal.jsx'); + +const Button = require('../../forms/button.jsx'); +const FlexRow = require('../../flex-row/flex-row.jsx'); + +require('../../forms/button.scss'); +require('./modal.scss'); + +const ReportModal = ({ + intl, + isConfirmed, + onReport, + onRequestClose, + ...modalProps +}) => ( + +
+
+
+ +
+
+ +
+
+
+ {isConfirmed ? ( + + ) : ( + + )} +
+
+
+ +
+ + {isConfirmed ? null : ( + + )} +
+
+
+
+); + + +ReportModal.propTypes = { + intl: intlShape, + isConfirmed: PropTypes.bool, + isOwnSpace: PropTypes.bool, + onReport: PropTypes.func, + onRequestClose: PropTypes.func, + type: PropTypes.string +}; + +module.exports = injectIntl(ReportModal); diff --git a/src/redux/preview.js b/src/redux/preview.js index 318f578d1..afda980f5 100644 --- a/src/redux/preview.js +++ b/src/redux/preview.js @@ -86,13 +86,13 @@ module.exports.previewReducer = (state, action) => { return Object.assign({}, state, { comments: [...state.comments, ...action.items] // TODO: consider a different way of doing this? }); - case 'SET_COMMENT_DELETED': + case 'UPDATE_COMMENT': if (action.topLevelCommentId) { return Object.assign({}, state, { replies: Object.assign({}, state.replies, { [action.topLevelCommentId]: state.replies[action.topLevelCommentId].map(comment => { if (comment.id === action.commentId) { - return Object.assign({}, comment, {deleted: true}); + return Object.assign({}, comment, action.comment); } return comment; }) @@ -103,7 +103,7 @@ module.exports.previewReducer = (state, action) => { return Object.assign({}, state, { comments: state.comments.map(comment => { if (comment.id === action.commentId) { - return Object.assign({}, comment, {deleted: true}); + return Object.assign({}, comment, action.comment); } return comment; }) @@ -229,9 +229,21 @@ module.exports.setStudioFetchStatus = (studioId, status) => ({ }); module.exports.setCommentDeleted = (commentId, topLevelCommentId) => ({ - type: 'SET_COMMENT_DELETED', + type: 'UPDATE_COMMENT', commentId: commentId, - topLevelCommentId: topLevelCommentId + topLevelCommentId: topLevelCommentId, + comment: { + deleted: true + } +}); + +module.exports.setCommentReported = (commentId, topLevelCommentId) => ({ + type: 'UPDATE_COMMENT', + commentId: commentId, + topLevelCommentId: topLevelCommentId, + comment: { + reported: true + } }); module.exports.addNewComment = (comment, topLevelCommentId) => ({ @@ -631,6 +643,23 @@ module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) }); }); +module.exports.reportComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => { + api({ + uri: `/proxy/report/project/${projectId}/comment/${commentId}`, + authentication: token, + withCredentials: true, + method: 'POST', + useCsrf: true + }, (err, body, res) => { + if (err || res.statusCode !== 200) { + log.error(err || res.body); + return; + } + // TODO use the reportId in the response for unreporting functionality + dispatch(module.exports.setCommentReported(commentId, topLevelCommentId)); + }); +}); + module.exports.reportProject = (id, jsonData) => (dispatch => { dispatch(module.exports.setFetchStatus('report', module.exports.Status.FETCHING)); // scratchr2 will fail if no thumbnail base64 string provided. We don't yet have diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index d5e4bede0..fcfaa8930 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -7,6 +7,8 @@ const FlexRow = require('../../../components/flex-row/flex-row.jsx'); const Avatar = require('../../../components/avatar/avatar.jsx'); const FormattedRelative = require('react-intl').FormattedRelative; const ComposeComment = require('./compose-comment.jsx'); +const DeleteCommentModal = require('../../../components/modal/comments/delete-comment.jsx'); +const ReportCommentModal = require('../../../components/modal/comments/report-comment.jsx'); require('./comment.scss'); @@ -15,10 +17,18 @@ class Comment extends React.Component { super(props); bindAll(this, [ 'handleDelete', + 'handleCancelDelete', + 'handleConfirmDelete', + 'handleReport', + 'handleConfirmReport', + 'handleCancelReport', 'handlePostReply', 'handleToggleReplying' ]); this.state = { + deleting: false, + reporting: false, + reportConfirmed: false, replying: false }; } @@ -33,9 +43,39 @@ class Comment extends React.Component { } handleDelete () { + this.setState({deleting: true}); + } + + handleConfirmDelete () { + this.setState({deleting: false}); this.props.onDelete(this.props.id); } + handleCancelDelete () { + this.setState({deleting: false}); + } + + handleReport () { + this.setState({reporting: true}); + } + + handleConfirmReport () { + this.setState({ + reporting: false, + reportConfirmed: true, + deleting: false // To close delete modal if reported from delete modal + }); + + this.props.onReport(this.props.id); + } + + handleCancelReport () { + this.setState({ + reporting: false, + reportConfirmed: false + }); + } + render () { const { author, @@ -45,7 +85,8 @@ class Comment extends React.Component { content, datetimeCreated, id, - projectId + projectId, + reported } = this.props; return ( @@ -71,7 +112,10 @@ class Comment extends React.Component { Delete {/* TODO internationalize */} ) : null} - + Report {/* TODO internationalize */} @@ -79,7 +123,8 @@ class Comment extends React.Component {
{/* TODO: at the moment, comment content does not properly display @@ -113,6 +158,24 @@ class Comment extends React.Component { ) : null} + {this.state.deleting ? ( + + ) : null} + {this.state.reporting || this.state.reportConfirmed ? ( + + ) : null}
); } @@ -132,7 +195,9 @@ Comment.propTypes = { id: PropTypes.number, onAddComment: PropTypes.func, onDelete: PropTypes.func, - projectId: PropTypes.number + onReport: PropTypes.func, + projectId: PropTypes.number, + reported: PropTypes.bool }; module.exports = Comment; diff --git a/src/views/preview/comment/comment.scss b/src/views/preview/comment/comment.scss index 48d741a48..6cc0f3d83 100644 --- a/src/views/preview/comment/comment.scss +++ b/src/views/preview/comment/comment.scss @@ -150,7 +150,7 @@ content: ""; } - &.comment-bubble-deleted { + &.comment-bubble-deleted, .comment-bubble-reported { $deleted-outline: #ff6680; $deleted-background: rgb(236, 206, 223); diff --git a/src/views/preview/comment/top-level-comment.jsx b/src/views/preview/comment/top-level-comment.jsx index 6cc67da91..62be1a13d 100644 --- a/src/views/preview/comment/top-level-comment.jsx +++ b/src/views/preview/comment/top-level-comment.jsx @@ -14,7 +14,8 @@ class TopLevelComment extends React.Component { bindAll(this, [ 'handleExpandThread', 'handleAddComment', - 'handleDeleteReply' + 'handleDeleteReply', + 'handleReportReply' ]); this.state = { expanded: false @@ -33,6 +34,12 @@ class TopLevelComment extends React.Component { this.props.onDelete(commentId, this.props.id); } + handleReportReply (commentId) { + // Only apply topLevelCommentId for reporting replies + // The top level comment itself just gets passed onReport directly + this.props.onReport(commentId, this.props.id); + } + handleAddComment (comment) { this.props.onAddComment(comment, this.props.id); } @@ -47,7 +54,9 @@ class TopLevelComment extends React.Component { deleted, id, onDelete, + onReport, replies, + reported, projectId } = this.props; @@ -56,7 +65,18 @@ class TopLevelComment extends React.Component { {replies.length > 0 && ))} @@ -109,9 +131,11 @@ TopLevelComment.propTypes = { id: PropTypes.number, onAddComment: PropTypes.func, onDelete: PropTypes.func, + onReport: PropTypes.func, parentId: PropTypes.number, projectId: PropTypes.string, - replies: PropTypes.arrayOf(PropTypes.object) + replies: PropTypes.arrayOf(PropTypes.object), + reported: PropTypes.bool }; module.exports = TopLevelComment; diff --git a/src/views/preview/l10n.json b/src/views/preview/l10n.json index 59f304b7c..6a9ea09e3 100644 --- a/src/views/preview/l10n.json +++ b/src/views/preview/l10n.json @@ -6,5 +6,13 @@ "preview.penExtensionChip": "Pen", "preview.speechExtensionChip": "Google Speech", "preview.translateExtensionChip": "Google Translate", - "preview.videoMotionChip": "Video Motion" + "preview.videoMotionChip": "Video Motion", + + "comments.report": "Report", + "comments.delete": "Delete", + "comments.reportModal.title": "Report Comment", + "comments.reportModal.reported": "The comment has been reported, and the Scratch Team has been notified.", + "comments.reportModal.prompt": "Are you sure you want to report this comment?", + "comments.deleteModal.title": "Delete Comment", + "comments.deleteModal.body": "Delete this comment? If the comment is mean or disrespectful, please click Report instead to let the Scratch Team know about it." } diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index 6824de137..e45b274fb 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -72,6 +72,7 @@ const PreviewPresentation = ({ onLoveClicked, onReportClicked, onReportClose, + onReportComment, onReportSubmit, onAddToStudioClicked, onAddToStudioClosed, @@ -343,8 +344,10 @@ const PreviewPresentation = ({ parentId={comment.parent_id} projectId={projectId} replies={replies && replies[comment.id] ? replies[comment.id] : []} + reported={comment.reported} onAddComment={onAddComment} onDelete={onDeleteComment} + onReport={onReportComment} /> ))} {comments.length < projectInfo.stats.comments && @@ -397,6 +400,7 @@ PreviewPresentation.propTypes = { onLoveClicked: PropTypes.func, onReportClicked: PropTypes.func.isRequired, onReportClose: PropTypes.func.isRequired, + onReportComment: PropTypes.func.isRequired, onReportSubmit: PropTypes.func.isRequired, onSeeInside: PropTypes.func, onToggleStudio: PropTypes.func, diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx index 76ed08b89..0dff319cb 100644 --- a/src/views/preview/preview.jsx +++ b/src/views/preview/preview.jsx @@ -42,6 +42,7 @@ class Preview extends React.Component { 'handlePopState', 'handleReportClick', 'handleReportClose', + 'handleReportComment', 'handleReportSubmit', 'handleAddToStudioClick', 'handleAddToStudioClose', @@ -173,6 +174,9 @@ class Preview extends React.Component { handleDeleteComment (id, topLevelCommentId) { this.props.handleDeleteComment(this.state.projectId, id, topLevelCommentId, this.props.user.token); } + handleReportComment (id, topLevelCommentId) { + this.props.handleReportComment(this.state.projectId, id, topLevelCommentId, this.props.user.token); + } handleReportClick () { this.setState({reportOpen: true}); } @@ -354,6 +358,7 @@ class Preview extends React.Component { onLoveClicked={this.handleLoveToggle} onReportClicked={this.handleReportClick} onReportClose={this.handleReportClose} + onReportComment={this.handleReportComment} onReportSubmit={this.handleReportSubmit} onSeeInside={this.handleSeeInside} onToggleStudio={this.handleToggleStudio} @@ -409,6 +414,7 @@ Preview.propTypes = { handleLogIn: PropTypes.func, handleLogOut: PropTypes.func, handleOpenRegistration: PropTypes.func, + handleReportComment: PropTypes.func, handleToggleLoginOpen: PropTypes.func, isEditable: PropTypes.bool, isLoggedIn: PropTypes.bool, @@ -538,6 +544,9 @@ const mapDispatchToProps = dispatch => ({ handleDeleteComment: (projectId, commentId, topLevelCommentId, token) => { dispatch(previewActions.deleteComment(projectId, commentId, topLevelCommentId, token)); }, + handleReportComment: (projectId, commentId, topLevelCommentId, token) => { + dispatch(previewActions.reportComment(projectId, commentId, topLevelCommentId, token)); + }, handleOpenRegistration: event => { event.preventDefault(); dispatch(navigationActions.setRegistrationOpen(true)); From ce84dddc34d0dd0976a4764d09624da33594dad2 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 9 Oct 2018 11:38:34 -0400 Subject: [PATCH 3/8] Fix proptype warning for project id --- src/views/preview/comment/comment.jsx | 2 +- src/views/preview/comment/compose-comment.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index fcfaa8930..22b5c28a2 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -196,7 +196,7 @@ Comment.propTypes = { onAddComment: PropTypes.func, onDelete: PropTypes.func, onReport: PropTypes.func, - projectId: PropTypes.number, + projectId: PropTypes.string, reported: PropTypes.bool }; diff --git a/src/views/preview/comment/compose-comment.jsx b/src/views/preview/comment/compose-comment.jsx index 0db753c58..73f07733c 100644 --- a/src/views/preview/comment/compose-comment.jsx +++ b/src/views/preview/comment/compose-comment.jsx @@ -183,7 +183,7 @@ ComposeComment.propTypes = { onAddComment: PropTypes.func, onCancel: PropTypes.func, parentId: PropTypes.number, - projectId: PropTypes.number, + projectId: PropTypes.string, user: PropTypes.shape({ id: PropTypes.number, username: PropTypes.string, From 997d0b56945fc7d311a94dab0cb8e92659c7ac21 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Wed, 10 Oct 2018 09:13:21 -0400 Subject: [PATCH 4/8] Fix css for report and delete comment styles --- src/views/preview/comment/comment.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/preview/comment/comment.scss b/src/views/preview/comment/comment.scss index 6cc0f3d83..a11189c05 100644 --- a/src/views/preview/comment/comment.scss +++ b/src/views/preview/comment/comment.scss @@ -150,7 +150,7 @@ content: ""; } - &.comment-bubble-deleted, .comment-bubble-reported { + &.comment-bubble-deleted, &.comment-bubble-reported { $deleted-outline: #ff6680; $deleted-background: rgb(236, 206, 223); From 237c6ecb55a974f9afe54b76c621f297a61d27a0 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Wed, 10 Oct 2018 09:17:18 -0400 Subject: [PATCH 5/8] Add parens for clarity --- src/views/preview/comment/comment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index 22b5c28a2..85b2394b5 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -167,7 +167,7 @@ class Comment extends React.Component { onRequestClose={this.handleCancelDelete} /> ) : null} - {this.state.reporting || this.state.reportConfirmed ? ( + {(this.state.reporting || this.state.reportConfirmed) ? ( Date: Wed, 10 Oct 2018 11:15:09 -0400 Subject: [PATCH 6/8] Fix internationalization --- src/l10n.json | 11 ++++++++++- src/views/preview/comment/comment.jsx | 8 +++++--- src/views/preview/l10n.json | 10 +--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/l10n.json b/src/l10n.json index 13e327d37..422f8017d 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -202,5 +202,14 @@ "report.tooShortError": "That's too short. Please describe in detail what's inappropriate or disrespectful about the project.", "report.send": "Send", "report.sending": "Sending...", - "report.textMissing": "Please tell us why you are reporting this project" + "report.textMissing": "Please tell us why you are reporting this project", + + "comments.report": "Report", + "comments.delete": "Delete", + "comments.reportModal.title": "Report Comment", + "comments.reportModal.reported": "The comment has been reported, and the Scratch Team has been notified.", + "comments.reportModal.prompt": "Are you sure you want to report this comment?", + "comments.deleteModal.title": "Delete Comment", + "comments.deleteModal.body": "Delete this comment? If the comment is mean or disrespectful, please click Report instead to let the Scratch Team know about it.", + "comments.reply": "reply" } diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index 85b2394b5..067e8aabd 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -6,6 +6,7 @@ const classNames = require('classnames'); const FlexRow = require('../../../components/flex-row/flex-row.jsx'); const Avatar = require('../../../components/avatar/avatar.jsx'); const FormattedRelative = require('react-intl').FormattedRelative; +const FormattedMessage = require('react-intl').FormattedMessage; const ComposeComment = require('./compose-comment.jsx'); const DeleteCommentModal = require('../../../components/modal/comments/delete-comment.jsx'); const ReportCommentModal = require('../../../components/modal/comments/report-comment.jsx'); @@ -109,14 +110,14 @@ class Comment extends React.Component { className="comment-delete" onClick={this.handleDelete} > - Delete {/* TODO internationalize */} +
) : null} - Report {/* TODO internationalize */} + @@ -142,11 +143,12 @@ class Comment extends React.Component { className="comment-reply" onClick={this.handleToggleReplying} > - reply + ) : null} + {this.state.replying ? ( Date: Wed, 10 Oct 2018 11:25:16 -0400 Subject: [PATCH 7/8] Use gray for deleted, red for reported --- src/views/preview/comment/comment.scss | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views/preview/comment/comment.scss b/src/views/preview/comment/comment.scss index a11189c05..6214a2212 100644 --- a/src/views/preview/comment/comment.scss +++ b/src/views/preview/comment/comment.scss @@ -150,9 +150,9 @@ content: ""; } - &.comment-bubble-deleted, &.comment-bubble-reported { - $deleted-outline: #ff6680; - $deleted-background: rgb(236, 206, 223); + &.comment-bubble-deleted { + $deleted-outline: $active-gray; + $deleted-background: rgb(215, 222, 234); border-color: $deleted-outline; background-color: $deleted-background; @@ -162,6 +162,19 @@ background: $deleted-background; } } + + &.comment-bubble-reported { + $reported-outline: #ff6680; + $reported-background: rgb(236, 206, 223); + + border-color: $reported-outline; + background-color: $reported-background; + + &:before { + border-color: $reported-outline transparent $reported-outline $reported-outline; + background: $reported-background; + } + } } .comment-content { From c535f8e731891fb12e0895c5a2f6057658ddf082 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Wed, 10 Oct 2018 14:01:14 -0400 Subject: [PATCH 8/8] Update report route to match newest API update --- src/redux/preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redux/preview.js b/src/redux/preview.js index afda980f5..fb1adc1a8 100644 --- a/src/redux/preview.js +++ b/src/redux/preview.js @@ -645,7 +645,7 @@ module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) module.exports.reportComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => { api({ - uri: `/proxy/report/project/${projectId}/comment/${commentId}`, + uri: `/proxy/project/${projectId}/comment/${commentId}/report`, authentication: token, withCredentials: true, method: 'POST',