mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +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`)
|
|
}
|
|
}
|