Updated reducer for editorial workflow

This commit is contained in:
Cássio Zen
2016-09-13 04:09:52 -03:00
parent f51525baaa
commit 165c758bb9
4 changed files with 22 additions and 10 deletions

View File

@ -57,7 +57,7 @@ class EntryPage extends React.Component {
const {
entry, entryDraft, boundGetMedia, collection, changeDraft, addMedia, removeMedia
} = this.props;
console.log(entry)
if (entryDraft == null || entryDraft.get('entry') == undefined || entry && entry.get('isFetching')) {
return <div>Loading...</div>;
}

View File

@ -35,8 +35,9 @@ export default function EntryPageHOC(EntryPage) {
const returnObj = {};
if (unpublishedEntry) {
// Overwrite loadEntry to loadUnpublishedEntry
const status = ownProps.params.status;
returnObj.loadEntry = (collection, slug) => {
dispatch(loadUnpublishedEntry(collection, slug));
dispatch(loadUnpublishedEntry(collection, status, slug));
};
}
return returnObj;