fix #11091 raise redirect issue (#11092)

This commit is contained in:
非法操作 2024-11-26 10:25:42 +08:00 committed by GitHub
parent 0f85e3557b
commit f1366e8e19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ const Apps = ({
if (onSuccess)
onSuccess()
localStorage.setItem(NEED_REFRESH_APP_LIST_KEY, '1')
getRedirection(isCurrentWorkspaceEditor, app, push)
getRedirection(isCurrentWorkspaceEditor, { id: app.app_id }, push)
}
catch (e) {
Toast.notify({ type: 'error', message: t('app.newApp.appCreateFailed') })

View File

@ -4,12 +4,12 @@ export const getRedirection = (
redirectionFunc: (href: string) => void,
) => {
if (!isCurrentWorkspaceEditor) {
redirectionFunc(`/app/${app.app_id}/overview`)
redirectionFunc(`/app/${app.id}/overview`)
}
else {
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
redirectionFunc(`/app/${app.app_id}/workflow`)
redirectionFunc(`/app/${app.id}/workflow`)
else
redirectionFunc(`/app/${app.app_id}/configuration`)
redirectionFunc(`/app/${app.id}/configuration`)
}
}