Skip to content

Commit

Permalink
fix langgenius#11091 raise redirect issue (langgenius#11092)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjlarry authored Nov 26, 2024
1 parent 0f85e35 commit f1366e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/app/components/explore/app-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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') })
Expand Down
6 changes: 3 additions & 3 deletions web/utils/app-redirection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
}
}

0 comments on commit f1366e8

Please sign in to comment.