mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
add store of app detail
This commit is contained in:
15
web/utils/app-redirection.ts
Normal file
15
web/utils/app-redirection.ts
Normal file
@ -0,0 +1,15 @@
|
||||
export const getRedirection = (
|
||||
isCurrentWorkspaceManager: boolean,
|
||||
app: any,
|
||||
redirectionFunc: (href: string) => void,
|
||||
) => {
|
||||
if (!isCurrentWorkspaceManager) {
|
||||
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`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user