Commit e3d1bb5f authored by Marcelo Rivera's avatar Marcelo Rivera
Browse files

(fix): redirect to onboarding after registering if necessary

parent 93552d17
Pipeline #107838847 passed with stages
in 48 minutes and 1 second
......@@ -12,6 +12,7 @@ import { OnboardingService } from '../onboarding/onboarding.service';
import { MindsTitle } from '../../services/ux/title';
import { FeaturesService } from '../../services/features.service';
import { V2TopbarService } from '../../common/layout/v2-topbar/v2-topbar.service';
import { OnboardingV2Service } from '../onboarding-v2/service/onboarding.service';
@Component({
selector: 'm-register',
......@@ -46,6 +47,7 @@ export class RegisterComponent implements OnInit, OnDestroy {
public navigation: NavigationService,
private featuresService: FeaturesService,
private topbarService: V2TopbarService,
private onboardingService: OnboardingV2Service,
public title: MindsTitle
) {
if (this.session.isLoggedIn()) {
......@@ -88,6 +90,13 @@ export class RegisterComponent implements OnInit, OnDestroy {
return;
}
if (this.featuresService.has('onboarding-december-2019')) {
if (this.onboardingService.shouldShow()) {
this.router.navigate(['/onboarding']);
}
return;
}
this.router.navigate(['/' + this.session.getLoggedInUser().username]);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment