Merge pull request #5427 from freesewing/joost
fix(shared): Fix route after save. Closes #5424
This commit is contained in:
commit
ddd12da2d1
1 changed files with 2 additions and 9 deletions
|
@ -1,12 +1,6 @@
|
|||
// __SDEFILE__ - This file is a dependency for the stand-alone environment
|
||||
// Dependencies
|
||||
import {
|
||||
workbenchHash,
|
||||
capitalize,
|
||||
shortDate,
|
||||
notEmpty,
|
||||
horFlexClassesNoSm,
|
||||
} from 'shared/utils.mjs'
|
||||
import { capitalize, shortDate, notEmpty, horFlexClassesNoSm } from 'shared/utils.mjs'
|
||||
import yaml from 'js-yaml'
|
||||
// Context
|
||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||
|
@ -67,8 +61,7 @@ export const SaveView = ({ design, settings, setView, saveAs }) => {
|
|||
true,
|
||||
])
|
||||
router.push(
|
||||
`/account/patterns/${id}` +
|
||||
(editAfterSaveAs ? '/edit' + workbenchHash({ settings, view: 'draft' }) : '')
|
||||
editAfterSaveAs ? `/account/patterns/${design}/edit?id=${id}` : `/account/pattern?id=${id}`
|
||||
)
|
||||
if (editAfterSaveAs) setView('draft')
|
||||
} else setLoadingStatus([true, 'backendError', true, false])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue