Skip to content

Commit

Permalink
remove REGISTRATION_2_0
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Sep 2, 2024
1 parent 7fbe21b commit 82b21a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 66 deletions.
11 changes: 2 additions & 9 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { LanguageGuard } from './guards/language.guard'
import { ThirdPartySigninCompletedGuard } from './guards/third-party-signin-completed.guard'
import { TwoFactorSigninGuard } from './guards/two-factor-signin.guard'
import { AuthenticatedNoDelegatorGuard } from './guards/authenticated-no-delagator.guard'
import { RegisterTogglGuard } from './guards/register-toggl.guard'

const routes: Routes = [
{
Expand Down Expand Up @@ -90,15 +89,9 @@ const routes: Routes = [
},
{
path: ApplicationRoutes.register,
canMatch: [RegisterTogglGuard],
canActivateChild: [LanguageGuard, RegisterGuard],
loadChildren: () => {
return localStorage.getItem('REGISTRATION_2_0') !== 'enabled'
? import('./register/register.module').then(
(m) => m.RegisterModuleLegacy
)
: import('./register2/register.module').then((m) => m.Register2Module)
},
loadChildren: () =>
import('./register2/register.module').then((m) => m.Register2Module),
},
{
path: ApplicationRoutes.search,
Expand Down
49 changes: 0 additions & 49 deletions src/app/guards/register-toggl.guard.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { take } from 'rxjs/operators'
import { PlatformInfoService } from 'src/app/cdk/platform-info'
import { ApplicationRoutes } from 'src/app/constants'
import { RegisterBackendErrors } from 'src/app/types/register.local'
import { TogglzService } from '../../../core/togglz/togglz.service'
@Component({
selector: 'app-backend-error',
templateUrl: './backend-error.component.html',
Expand All @@ -16,7 +15,6 @@ export class BackendErrorComponent implements OnInit {
_errorCode: string
@Input() nextButtonWasClicked = false
@Input() showEmailAlreadyExistUntilNextButtonWasClicked = false
registrationTogglz = false

@Input()
set errorCode(errorCode: string) {
Expand All @@ -33,14 +31,9 @@ export class BackendErrorComponent implements OnInit {
unrecognizedError = false
constructor(
private _platformInfo: PlatformInfoService,
private _router: Router,
private _togglz: TogglzService
private _router: Router
) {}
ngOnInit() {
this._togglz
.getStateOf('REGISTRATION_2_0')
.pipe(take(1))
.subscribe((value) => (this.registrationTogglz = value))
if (!(this.errorCode in RegisterBackendErrors)) {
this.unrecognizedError = true
}
Expand Down

0 comments on commit 82b21a2

Please sign in to comment.