frontend: Refactor login component to use queryParams subscription for redirect handling
This commit is contained in:
parent
473c7be726
commit
2b776ac181
@ -40,10 +40,12 @@ export class LoginComponent {
|
||||
this.openviduLogoUrl = this.contextService.getOpenViduLogoUrl();
|
||||
this.backgroundImageUrl = this.contextService.getBackgroundImageUrl();
|
||||
const redirectParam = this.route.snapshot.queryParams['redirectTo'];
|
||||
|
||||
if (redirectParam) {
|
||||
this.redirectTo = redirectParam;
|
||||
}
|
||||
|
||||
this.route.queryParams.subscribe((params) => {
|
||||
if (params['redirectTo']) {
|
||||
this.redirectTo = params['redirectTo'];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async login() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user