Skip to content

Commit

Permalink
add lazy loading for campaign details module (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay authored Sep 26, 2023
1 parent bd09934 commit 2164519
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CampaignDetailsContainerComponent } from './components/campaign-details
import { PublicPagesGuard } from '@core/services/public-pages.guard';

const routes: Routes = [
/*{
{
path: '',
component: CampaignDetailsContainerComponent,
children: [
Expand All @@ -27,7 +27,7 @@ const routes: Routes = [
canActivate: [AuthGuardService]
}
]
}*/
}
];

@NgModule({
Expand Down
8 changes: 4 additions & 4 deletions src/app/campaigns/campaigns-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const routes: Routes = [
{ path: '', redirectTo: '/welcome', pathMatch: 'full' }
]
},
{
/*{
path:'campaign/:id',
component: CampaignDetailComponent
},
Expand All @@ -50,14 +50,14 @@ const routes: Routes = [
path: 'campaign/:id/recover-my-gains',
component: RecoverGainsComponent,
canActivate: [AuthGuardService]
},
/*{
},*/
{
path: 'campaign/:id',
loadChildren: () =>
import('./campaign-details/campaign-details.module').then(
(m) => m.CampaignDetailsModule
),
},*/
},
{
path: 'welcome',
component: FarmWelcomeComponent
Expand Down
3 changes: 1 addition & 2 deletions src/app/campaigns/campaigns.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { DraftPictureComponent } from './components/draft-picture/draft-picture.
import { CommonModule } from '@angular/common';
import { SocialsComponent } from './socials/socials.component';
import { SharedModule } from '@app/shared/shared.module';
import { CampaignDetailsModule } from './campaign-details/campaign-details.module';

@NgModule({
declarations: [
CampaignsDashboardComponent,
Expand Down Expand Up @@ -63,7 +63,6 @@ import { CampaignDetailsModule } from './campaign-details/campaign-details.modul
imports: [
CommonModule,
CampaignsRoutingModule,
CampaignDetailsModule,
CampaignsSharedUiModule,
NgxTweetModule,
EffectsModule.forFeature([LinksListEffects]),
Expand Down

0 comments on commit 2164519

Please sign in to comment.