22 lines
682 B
TypeScript
22 lines
682 B
TypeScript
import { Routes } from '@angular/router';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
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: 'new',
|
|
loadComponent: () =>
|
|
import('./pages/create-page/create-page').then((m) => m.CreatePage)
|
|
},
|
|
{ path: '**', redirectTo: '' }
|
|
];
|