frontend: Refactor login component to use queryParams subscription for redirect handling

This commit is contained in:
juancarmore 2025-03-26 13:57:50 +01:00
parent 473c7be726
commit 2b776ac181

View File

@ -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() {