Update EntryPageHOC for React Router 4.
This commit is contained in:
parent
5bdc8dd87f
commit
f966cd81bd
@ -18,8 +18,8 @@ export default function EntryPageHOC(EntryPage) {
|
|||||||
const returnObj = { isEditorialWorkflow, showDelete: !ownProps.newEntry };
|
const returnObj = { isEditorialWorkflow, showDelete: !ownProps.newEntry };
|
||||||
if (isEditorialWorkflow) {
|
if (isEditorialWorkflow) {
|
||||||
returnObj.showDelete = false;
|
returnObj.showDelete = false;
|
||||||
const slug = ownProps.params.slug;
|
const slug = ownProps.match.params.slug;
|
||||||
const collection = collections.get(ownProps.params.name);
|
const collection = collections.get(ownProps.match.params.name);
|
||||||
const unpublishedEntry = selectUnpublishedEntry(state, collection.get('name'), slug);
|
const unpublishedEntry = selectUnpublishedEntry(state, collection.get('name'), slug);
|
||||||
if (unpublishedEntry) {
|
if (unpublishedEntry) {
|
||||||
returnObj.unpublishedEntry = true;
|
returnObj.unpublishedEntry = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user