mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 03:38:08 +08:00
8bcc5a36bb
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: crazywoola <427733928@qq.com>
16 lines
409 B
TypeScript
16 lines
409 B
TypeScript
export const getRedirection = (
|
|
isCurrentWorkspaceEditor: boolean,
|
|
app: any,
|
|
redirectionFunc: (href: string) => void,
|
|
) => {
|
|
if (!isCurrentWorkspaceEditor) {
|
|
redirectionFunc(`/app/${app.id}/overview`)
|
|
}
|
|
else {
|
|
if (app.mode === 'workflow' || app.mode === 'advanced-chat')
|
|
redirectionFunc(`/app/${app.id}/workflow`)
|
|
else
|
|
redirectionFunc(`/app/${app.id}/configuration`)
|
|
}
|
|
}
|