Skip to content

Commit d1bf5b0

Browse files
committed
fix(connect-addon): fix to redirect to expected page
1 parent 1434ee6 commit d1bf5b0

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/app/features/project/project-addons/components/connect-configured-addon/connect-configured-addon.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ export class ConnectConfiguredAddonComponent {
192192
complete: () => {
193193
const createdAddon = this.createdConfiguredAddon();
194194
if (createdAddon) {
195-
this.router.navigate([`${this.baseUrl()}/addons`]);
195+
const type = this.addonTypeString()?.toLowerCase();
196+
this.router.navigate([`${this.baseUrl()}/addons`], {
197+
queryParams: {
198+
activeTab: 1,
199+
type: type,
200+
},
201+
});
196202
this.toastService.showSuccess('settings.addons.toast.createSuccess', {
197203
addonName: AddonServiceNames[addon.externalServiceName as keyof typeof AddonServiceNames],
198204
});

src/app/features/settings/settings-addons/components/connect-addon/connect-addon.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ export class ConnectAddonComponent {
122122
}
123123

124124
private showSuccessAndRedirect(createdAddon: AuthorizedAccountModel | null): void {
125-
this.router.navigate([`${this.baseUrl()}/addons`]);
125+
const type = this.addonTypeString()?.toLowerCase();
126+
this.router.navigate([`${this.baseUrl()}/addons`], {
127+
queryParams: {
128+
activeTab: 1,
129+
type: type,
130+
},
131+
});
126132
this.toastService.showSuccess('settings.addons.toast.createSuccess', {
127133
addonName: AddonServiceNames[createdAddon?.externalServiceName as keyof typeof AddonServiceNames],
128134
});

0 commit comments

Comments
 (0)