add store of app detail

This commit is contained in:
JzoNg
2024-03-05 15:27:20 +08:00
parent eab405af5b
commit 186b85cd62
5 changed files with 48 additions and 9 deletions

View 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`)
}
}