Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
fix: revert previous commit
  • Loading branch information
Jordan Powell committed Nov 5, 2019
commit 8c8ffea9722ca653678bdfa25bd14eccf9d82964
5 changes: 2 additions & 3 deletions projects/example-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { CoreModule } from '@example-app/core';
import { AppRoutingModule } from '@example-app/app-routing.module';
import {
UserEffects,
RouterEffects,
LayoutEffects,
RouterEffects
} from '@example-app/core/effects';
import { AppComponent } from '@example-app/core/containers';

Expand Down Expand Up @@ -79,7 +78,7 @@ import { AppComponent } from '@example-app/core/containers';
*
* See: https://ngrx.io/guide/effects#registering-root-effects
*/
EffectsModule.forRoot([UserEffects, RouterEffects, LayoutEffects]),
EffectsModule.forRoot([UserEffects, RouterEffects]),
CoreModule,
],
bootstrap: [AppComponent],
Expand Down
1 change: 0 additions & 1 deletion projects/example-app/src/app/core/effects/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './user.effects';
export * from './router.effects';
export * from './layout.effects';
34 changes: 0 additions & 34 deletions projects/example-app/src/app/core/effects/layout.effects.spec.ts

This file was deleted.

17 changes: 0 additions & 17 deletions projects/example-app/src/app/core/effects/layout.effects.ts

This file was deleted.

4 changes: 3 additions & 1 deletion projects/example-app/src/app/core/reducers/layout.reducer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createReducer, on } from '@ngrx/store';

import { LayoutActions } from '@example-app/core/actions';
import { AuthActions } from '@example-app/auth/actions';

export const layoutFeatureKey = 'layout';

Expand All @@ -16,7 +17,8 @@ export const reducer = createReducer(
initialState,
// Even thought the `state` is unused, it helps infer the return type
on(LayoutActions.closeSidenav, state => ({ showSidenav: false })),
on(LayoutActions.openSidenav, state => ({ showSidenav: true }))
on(LayoutActions.openSidenav, state => ({ showSidenav: true })),
on(AuthActions.logoutConfirmation, state => ({ showSidenav: false }))
);

export const selectShowSidenav = (state: State) => state.showSidenav;