Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
abigails comments
  • Loading branch information
andresacg30 committed Sep 30, 2022
commit 90b51e2c049b89d72efbf858600f1f9a10aecc4b
24 changes: 12 additions & 12 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,10 @@ import { V2RedirectComponent } from './modules/v2-redirect/v2-redirect.component
import { EnvironmentType } from 'src/environments/enum';
import { environment } from 'src/environments/environment';

const isLegacyProd: boolean = environment.production === EnvironmentType.TT_DEV;
const isNotLegacy: boolean = environment.production !== EnvironmentType.TT_DEV;
let routes: Routes;

if (isLegacyProd) {
routes = [
{
path: '',
children: [
{ path: '**', component: V2RedirectComponent },
],
},
];

} else {
if (isNotLegacy) {
routes = [
{
path: '',
Expand All @@ -46,6 +36,16 @@ if (isLegacyProd) {
},
{ path: 'login', component: LoginComponent }
];

} else {
routes = [
{
path: '',
children: [
{ path: '**', component: V2RedirectComponent },
],
},
];
}
@NgModule({
imports: [RouterModule.forRoot(routes)],
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/v2-redirect/v2-redirect.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ body {
top: 0;
z-index: 10;
}
}
}
2 changes: 1 addition & 1 deletion src/app/modules/v2-redirect/v2-redirect.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./v2-redirect.component.css']
})
export class V2RedirectComponent {

}