Skip to content
Snippets Groups Projects
Commit 1f822c98 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/redirection-on-login' into 'dev'

redirection on login now to acteurs

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client!123
parents e0158d29 3e259fb0
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!135Dev,!123redirection on login now to acteurs
......@@ -15,7 +15,6 @@ export class SignUpModalComponent implements OnInit {
public loading = false;
public submitted = false;
public authFailed = false;
public returnUrl: string;
public isShowPassword = false;
constructor(
private formBuilder: FormBuilder,
......@@ -32,8 +31,6 @@ export class SignUpModalComponent implements OnInit {
email: ['', [Validators.required, Validators.pattern(CustomRegExp.EMAIL)]],
password: ['', [Validators.required, Validators.pattern(CustomRegExp.PASSWORD)]],
});
// get return url from route parameters or default to '/'
this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/';
}
// getter for form fields
......@@ -68,7 +65,7 @@ export class SignUpModalComponent implements OnInit {
.pipe(first())
.subscribe(
() => {
this.router.navigate([this.returnUrl]);
this.router.navigate([this.router.url]);
this.closeModal();
},
() => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment