Skip to content

Commit 0656aee

Browse files
authored
Merge pull request #992 from devtron-labs/fix/param-redirection
fix: refactor handleDashboardLogout to use getUrlWithSearchParams for…
2 parents 12f9a58 + c494889 commit 0656aee

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.21.1",
3+
"version": "1.21.2",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/API/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import { MutableRefObject } from 'react'
1818

1919
import { URLS } from '@Common/Constants'
20+
import { getUrlWithSearchParams } from '@Common/Helper'
2021
import { ServerErrors } from '@Common/ServerError'
2122

2223
import { RESPONSE_MESSAGES } from './constants'
@@ -62,7 +63,9 @@ export const getIsRequestAborted = (error) =>
6263

6364
export const handleDashboardLogout = () => {
6465
const continueParam = `${window.location.pathname.replace(window.__BASE_URL__, '')}${window.location.search}`
65-
window.location.href = `${window.location.origin}${window.__BASE_URL__}${URLS.LOGIN_SSO}?continue=${continueParam}`
66+
window.location.href = getUrlWithSearchParams(`${window.location.origin}${window.__BASE_URL__}${URLS.LOGIN_SSO}`, {
67+
continue: continueParam,
68+
})
6669
}
6770

6871
export const handleRedirectToLicenseActivation = () => {

0 commit comments

Comments
 (0)