Co-authored-by: Joel <[email protected]> Co-authored-by: Yeuoly <[email protected]> Co-authored-by: JzoNg <[email protected]> Co-authored-by: StyleZhang <[email protected]> Co-authored-by: jyong <[email protected]> Co-authored-by: nite-knite <[email protected]> Co-authored-by: jyong <[email protected]>
16 lines
411 B
TypeScript
16 lines
411 B
TypeScript
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`)
|
|
}
|
|
}
|