diff --git a/src/redux/preview.js b/src/redux/preview.js index d8a8d6f62..30f0830b3 100644 --- a/src/redux/preview.js +++ b/src/redux/preview.js @@ -55,6 +55,10 @@ module.exports.previewReducer = (state, action) => { projectInfo: action.info ? action.info : {}, projectNotAvailable: !action.info }); + case 'UPDATE_PROJECT_INFO': + return Object.assign({}, state, { + projectInfo: Object.assign({}, state.projectInfo, action.info) + }); case 'SET_REMIXES': return Object.assign({}, state, { remixes: action.items @@ -182,6 +186,11 @@ module.exports.setProjectInfo = info => ({ info: info }); +module.exports.updateProjectInfo = info => ({ + type: 'UPDATE_PROJECT_INFO', + info: info +}); + module.exports.setOriginalInfo = info => ({ type: 'SET_ORIGINAL', info: info @@ -785,7 +794,7 @@ module.exports.shareProject = (projectId, token) => (dispatch => { return; } dispatch(module.exports.setFetchStatus('project', module.exports.Status.FETCHED)); - dispatch(module.exports.setProjectInfo(body)); + dispatch(module.exports.updateProjectInfo(body)); }); });