Skip to content

Commit

Permalink
25147 - Changed the redirection link of the new BRD (#3197)
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim authored Jan 8, 2025
1 parent 0470ea7 commit acc0a52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.7.1",
"version": "2.7.2",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
8 changes: 7 additions & 1 deletion auth-web/src/routes/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,14 @@ export function getRoutes (): RouteConfig[] {
path: '/account/:orgId',
name: 'account',
beforeEnter: (to, from, next) => {
// redirect to new business registry dashboard
if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && !to.query.noRedirect) {
window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl()
const baseUrl = ConfigHelper.getNewBusinessRegistryDashboardUrl() + '/account/' + to.params.orgId
// Preserve query parameters when redirecting
const queryString = new URLSearchParams(to.query as Record<string, string>).toString()
const redirectUrl = queryString ? `${baseUrl}?${queryString}` : baseUrl

window.location.href = redirectUrl
} else {
next()
}
Expand Down

0 comments on commit acc0a52

Please sign in to comment.