Skip to content

Commit 4016394

Browse files
committed
fix: redirect on previous url on closing create devtro
n app modal
1 parent 668fd65 commit 4016394

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export const HeaderWithCreateButton = ({ headerName }: HeaderWithCreateButtonPro
4646
}
4747

4848
const openCreateDevtronAppModel = () => {
49-
const canOpenModalWithDevtronApps = params.appType
50-
? params.appType === AppListConstants.AppType.DEVTRON_APPS
51-
: serverMode === SERVER_MODE.FULL
52-
const _appType = canOpenModalWithDevtronApps ? AppListConstants.AppType.DEVTRON_APPS : URLS.APP_LIST_HELM
53-
const _urlPrefix = `${URLS.APP}/${URLS.APP_LIST}/${_appType}`
49+
const _urlPrefix = `${URLS.APP}/${URLS.APP_LIST}/${params.appType ?? AppListConstants.AppType.DEVTRON_APPS}`
5450
history.push(`${_urlPrefix}/${AppListConstants.CREATE_DEVTRON_APP_URL}${location.search}`)
5551
}
5652

0 commit comments

Comments
 (0)