mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-03 11:02:56 +00:00
fix(console): keep current url after org switch (#7118)
Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
@@ -265,7 +265,12 @@ export class AppComponent implements OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public changedOrg(org: Org.AsObject): void {
|
public changedOrg(org: Org.AsObject): void {
|
||||||
this.router.navigate(['/org']);
|
// Reference: https://stackoverflow.com/a/58114797
|
||||||
|
const currentUrl = this.router.url;
|
||||||
|
this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
|
||||||
|
// We use navigateByUrl as our urls may have queryParams
|
||||||
|
this.router.navigateByUrl(currentUrl);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private setLanguage(): void {
|
private setLanguage(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user