fix(editor): add referrer param for the workflow page (#4600)

This commit is contained in:
Kancer (Nilay) Gökırmak 2020-11-26 14:39:54 +01:00 committed by GitHub
parent 4789d20538
commit 562a8e06b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -446,6 +446,10 @@ function mapStateToProps(state, ownProps) {
const localBackup = entryDraft.get('localBackup');
const draftKey = entryDraft.get('key');
let editorBackLink = `/collections/${collectionName}`;
if (new URLSearchParams(ownProps.location.search).get('ref') === 'workflow') {
editorBackLink = `/workflow`;
}
if (collection.has('nested') && slug) {
const pathParts = slug.split('/');
if (pathParts.length > 2) {

View File

@ -209,7 +209,7 @@ class WorkflowList extends React.Component {
);
const slug = entry.get('slug');
const collectionName = entry.get('collection');
const editLink = `collections/${collectionName}/entries/${slug}`;
const editLink = `collections/${collectionName}/entries/${slug}?ref=workflow`;
const ownStatus = entry.get('status');
const collection = collections.find(
collection => collection.get('name') === collectionName,