Commiting unpublished branches on pre existing branch (updates PR)

This commit is contained in:
Cássio Zen
2016-09-13 14:31:18 -03:00
parent e8fe7e0c80
commit 686dd51410
4 changed files with 124 additions and 31 deletions

View File

@ -1,7 +1,7 @@
import React from 'react';
import { EDITORIAL_WORKFLOW } from '../../constants/publishModes';
import { selectUnpublishedEntry } from '../../reducers';
import { loadUnpublishedEntry } from '../../actions/editorialWorkflow';
import { loadUnpublishedEntry, persistUnpublishedEntry } from '../../actions/editorialWorkflow';
import { connect } from 'react-redux';
export default function EntryPageHOC(EntryPage) {
@ -22,10 +22,6 @@ export default function EntryPageHOC(EntryPage) {
const slug = ownProps.params.slug;
const entry = selectUnpublishedEntry(state, status, slug);
returnObj.entry = entry;
returnObj.persistEntry = () => {
// TODO - for now, simply ignore
};
}
return returnObj;
}
@ -39,6 +35,10 @@ export default function EntryPageHOC(EntryPage) {
returnObj.loadEntry = (collection, slug) => {
dispatch(loadUnpublishedEntry(collection, status, slug));
};
returnObj.persistEntry = (collection, entryDraft) => {
dispatch(persistUnpublishedEntry(collection, status, entryDraft));
};
}
return returnObj;
}