Commit 8a33d1c5 authored by Paul Kaplan's avatar Paul Kaplan

Re-export missing base comment actions to simplify

parent d02ddef8
......@@ -6,6 +6,8 @@ const log = require('../lib/log');
const COMMENT_LIMIT = 20;
const {
addNewComment,
resetComments,
Status,
setFetchStatus,
setCommentDeleted,
......@@ -169,5 +171,10 @@ module.exports = {
getReplies,
deleteComment,
reportComment,
restoreComment
restoreComment,
// Re-export these specific action creators directly so the implementer
// does not need to go to two places for comment actions
addNewComment,
resetComments
};
......@@ -5,7 +5,7 @@ const Page = require('../../components/page/www/page.jsx');
const render = require('../../lib/render.jsx');
const previewActions = require('../../redux/preview.js');
const commentsActions = require('../../redux/comments.js');
const commentActions = require('../../redux/comments.js');
const isSupportedBrowser = require('../../lib/supported-browser').default;
const UnsupportedBrowser = require('./unsupported-browser.jsx');
......@@ -17,7 +17,7 @@ if (isSupportedBrowser()) {
document.getElementById('app'),
{
preview: previewActions.previewReducer,
comments: commentsActions.commentsReducer,
comments: commentActions.commentsReducer,
...ProjectView.guiReducers
},
{
......
......@@ -29,7 +29,6 @@ const Meta = require('./meta.jsx');
const sessionActions = require('../../redux/session.js');
const navigationActions = require('../../redux/navigation.js');
const previewActions = require('../../redux/preview.js');
const commentsActions = require('../../redux/comments.js');
const projectCommentActions = require('../../redux/project-comment-actions.js');
const frameless = require('../../lib/frameless');
......@@ -1036,7 +1035,7 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => ({
handleAddComment: (comment, topLevelCommentId) => {
dispatch(commentsActions.addNewComment(comment, topLevelCommentId));
dispatch(projectCommentActions.addNewComment(comment, topLevelCommentId));
},
handleDeleteComment: (projectId, commentId, topLevelCommentId, token) => {
dispatch(projectCommentActions.deleteComment(projectId, commentId, topLevelCommentId, token));
......@@ -1063,7 +1062,7 @@ const mapDispatchToProps = dispatch => ({
dispatch(navigationActions.toggleLoginOpen());
},
handleSeeAllComments: (id, ownerUsername, isAdmin, token) => {
dispatch(commentsActions.resetComments());
dispatch(projectCommentActions.resetComments());
dispatch(projectCommentActions.getTopLevelComments(id, 0, ownerUsername, isAdmin, token));
},
handleUpdateProjectThumbnail: (id, blob) => {
......@@ -1138,7 +1137,7 @@ const mapDispatchToProps = dispatch => ({
},
remixProject: () => {
dispatch(GUI.remixProject());
dispatch(commentsActions.resetComments());
dispatch(projectCommentActions.resetComments());
},
setPlayer: player => {
dispatch(GUI.setPlayer(player));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment