Skip to content

Commit

Permalink
refactor(eb-league): no more modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kdinev committed Mar 1, 2024
1 parent 697d1d4 commit 5979b62
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 201 deletions.
3 changes: 1 addition & 2 deletions projects/bellumgens/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { TeamResultsComponent } from './search/search-results/team-results/team-
import { PlayerResultsComponent } from './search/search-results/player-results/player-results.component';
import { EmailconfirmComponent } from './emailconfirm/emailconfirm.component';
import { RegistrationComponent, UnauthorizedComponent } from '../../../common/src/public_api';
import { EventsComponent } from './events/events.component';

export const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'bellumgenselite', component: EventsComponent },
{ path: 'bellumgenselite', loadComponent: () => import('./events/events.component').then(m => m.EventsComponent) },
{ path: 'register', component: RegistrationComponent },
{ path: 'unauthorized', redirectTo: 'unauthorized/', pathMatch: 'full' },
{ path: 'unauthorized/:message', component: UnauthorizedComponent },
Expand Down
70 changes: 0 additions & 70 deletions projects/ebleague/src/app/admin/admin.module.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { Routes } from '@angular/router';
import { AdminComponent } from './admin.component';
import { AdminCsgoComponent } from './admin-csgo/admin-csgo.component';
import { AdminGuard, EventAdminGuard } from '../../../../common/src/public_api';
import { AdminSc2Component } from './admin-sc2/admin-sc2.component';
import { AdminMainComponent } from './admin-main/admin-main.component';

const routes: Routes = [
export const routes: Routes = [
{ path: '', component: AdminComponent, children: [
{ path: '', component: AdminMainComponent, canActivate: [ AdminGuard ] },
{ path: 'csgo', component: AdminCsgoComponent, canActivate: [ EventAdminGuard ] },
{ path: 'sc2', component: AdminSc2Component, canActivate: [ EventAdminGuard ] }
] }
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AdminRoutingModule { }
12 changes: 5 additions & 7 deletions projects/ebleague/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { RaffleComponent } from './raffle/raffle.component';
import { RegistrationSuccessComponent } from './tournament-registration/registration-success/registration-success.component';
import { RegistrationComponent, UnauthorizedComponent } from '../../../common/src/public_api';
import { NewsComponent } from './news/news.component';

export const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'giveaway', redirectTo: 'raffle', pathMatch: 'full' },
{ path: 'raffle', component: RaffleComponent },
{ path: 'raffle', loadComponent: () => import('./raffle/raffle.component').then(c => c.RaffleComponent) },
{ path: 'register', component: RegistrationComponent },
{ path: 'news', component: NewsComponent, data: {
title: 'Esports Business League - News',
Expand All @@ -18,14 +16,14 @@ export const routes: Routes = [
image: '/assets/crew/sugarbunny.jpg'
}
},
{ path: 'registration-success', component: RegistrationSuccessComponent },
{ path: 'registration-success', loadComponent: () => import('./tournament-registration/registration-success/registration-success.component').then(c => c.RegistrationSuccessComponent) },
{ path: 'unauthorized', redirectTo: 'unauthorized/', pathMatch: 'full' },
{ path: 'unauthorized/:message', component: UnauthorizedComponent },
{ path: 'format', redirectTo: '/tournament/format', pathMatch: 'full' },
{ path: 'csgo', redirectTo: '/tournament/csgo/', pathMatch: 'full' },
{ path: 'sc2', redirectTo: '/tournament/sc2/', pathMatch: 'full' },
{ path: 'admin', loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule) },
{ path: 'tournament', loadChildren: () => import('./tournaments/tournament.module').then(m => m.TournamentModule) },
{ path: 'shop', loadChildren: () => import('./shop/shop.module').then(m => m.ShopModule) },
{ path: 'admin', loadChildren: () => import('./admin/admin.routes').then(m => m.routes) },
{ path: 'tournament', loadChildren: () => import('./tournaments/tournament.routes').then(m => m.routes) },
{ path: 'shop', loadChildren: () => import('./shop/shop.routes').then(m => m.routes) },
{ path: '**', component: HomeComponent }
];
38 changes: 0 additions & 38 deletions projects/ebleague/src/app/shop/shop.module.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { Routes } from '@angular/router';
import { ShopComponent } from './shop.component';
import { OrderSuccessComponent } from './order-success/order-success.component';

const routes: Routes = [
export const routes: Routes = [
{ path: '', component: ShopComponent, data: {
title: 'Esports Business League - Shop',
twitterTitle: 'Esports бизнес лига - Магазин',
Expand All @@ -17,9 +15,3 @@ const routes: Routes = [
},
{ path: 'order-success', component: OrderSuccessComponent }
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ShopRoutingModule { }
54 changes: 0 additions & 54 deletions projects/ebleague/src/app/tournaments/tournament.module.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { Routes } from '@angular/router';
import { TournamentComponent } from './tournament.component';
import { TournamentFormatComponent } from './tournament-format/tournament-format.component';
import { TournamentCsgoComponent } from './tournament-csgo/tournament-csgo.component';
import { TournamentSc2Component } from './tournament-sc2/tournament-sc2.component';
import { ProductionCrewComponent } from './production-crew/production-crew.component';
import { TournamentsMainComponent } from './tournaments-main/tournaments-main.component';

const routes: Routes = [
export const routes: Routes = [
{ path: '', component: TournamentComponent, children: [
{ path: '', component: TournamentsMainComponent },
{ path: 'csgo', redirectTo: 'csgo/', pathMatch: 'full' },
Expand All @@ -33,9 +31,3 @@ const routes: Routes = [
{ path: 'format', component: TournamentFormatComponent },
{ path: 'crew', component: ProductionCrewComponent }
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class TournamentRoutingModule { }

0 comments on commit 5979b62

Please sign in to comment.