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
|
// __SDEFILE__ - This file is a dependency for the stand-alone environment
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import {
|
import { capitalize, shortDate, notEmpty, horFlexClassesNoSm } from 'shared/utils.mjs'
|
||||||
workbenchHash,
|
|
||||||
capitalize,
|
|
||||||
shortDate,
|
|
||||||
notEmpty,
|
|
||||||
horFlexClassesNoSm,
|
|
||||||
} from 'shared/utils.mjs'
|
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
// Context
|
// Context
|
||||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||||
|
@ -67,8 +61,7 @@ export const SaveView = ({ design, settings, setView, saveAs }) => {
|
||||||
true,
|
true,
|
||||||
])
|
])
|
||||||
router.push(
|
router.push(
|
||||||
`/account/patterns/${id}` +
|
editAfterSaveAs ? `/account/patterns/${design}/edit?id=${id}` : `/account/pattern?id=${id}`
|
||||||
(editAfterSaveAs ? '/edit' + workbenchHash({ settings, view: 'draft' }) : '')
|
|
||||||
)
|
)
|
||||||
if (editAfterSaveAs) setView('draft')
|
if (editAfterSaveAs) setView('draft')
|
||||||
} else setLoadingStatus([true, 'backendError', true, false])
|
} else setLoadingStatus([true, 'backendError', true, false])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue