From f1366e8e195d4a86759a010cd5322a8571ee57ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Tue, 26 Nov 2024 10:25:42 +0800 Subject: [PATCH] fix #11091 raise redirect issue (#11092) --- web/app/components/explore/app-list/index.tsx | 2 +- web/utils/app-redirection.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx index bd50708cb4..b8e7939328 100644 --- a/web/app/components/explore/app-list/index.tsx +++ b/web/app/components/explore/app-list/index.tsx @@ -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') }) diff --git a/web/utils/app-redirection.ts b/web/utils/app-redirection.ts index b14f660e63..534b019250 100644 --- a/web/utils/app-redirection.ts +++ b/web/utils/app-redirection.ts @@ -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`) } }