rebasing
This commit is contained in:
@@ -1,38 +1,36 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { authGuard, loginGuard } from './guards/auth.guard';
|
||||
import { LoginComponent } from './components/login/login.component';
|
||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||
import { ActiveChecksComponent } from './components/active-checks/active-checks.component';
|
||||
import { HistoryComponent } from './components/history/history.component';
|
||||
import { Routes } from '@angular/router';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/login',
|
||||
pathMatch: 'full'
|
||||
loadComponent: () => {
|
||||
// Branch: ?id=<orderId> means legacy SBP merchant flow.
|
||||
const hasLegacyId = typeof window !== 'undefined'
|
||||
&& new URLSearchParams(window.location.search).has('id');
|
||||
return hasLegacyId
|
||||
? import('./pages/legacy-pay-page/legacy-pay-page').then((m) => m.LegacyPayPage)
|
||||
: import('./pages/fastcheck-page/fastcheck-page').then((m) => m.FastcheckPage);
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginComponent,
|
||||
canActivate: [loginGuard]
|
||||
path: 'new',
|
||||
loadComponent: () =>
|
||||
import('./pages/create-page/create-page').then((m) => m.CreatePage)
|
||||
},
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: DashboardComponent,
|
||||
canActivate: [authGuard]
|
||||
path: 'about',
|
||||
loadComponent: () =>
|
||||
import('./pages/about-page/about-page').then((m) => m.AboutPage)
|
||||
},
|
||||
{
|
||||
path: 'active-checks',
|
||||
component: ActiveChecksComponent,
|
||||
canActivate: [authGuard]
|
||||
path: 'contacts',
|
||||
loadComponent: () =>
|
||||
import('./pages/contacts-page/contacts-page').then((m) => m.ContactsPage)
|
||||
},
|
||||
{
|
||||
path: 'history',
|
||||
component: HistoryComponent,
|
||||
canActivate: [authGuard]
|
||||
path: 'partners',
|
||||
loadComponent: () =>
|
||||
import('./pages/partners-page/partners-page').then((m) => m.PartnersPage)
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
redirectTo: '/login'
|
||||
}
|
||||
{ path: '**', redirectTo: '' }
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user