diff --git a/projects/example-app/src/app/auth/effects/auth.effects.ts b/projects/example-app/src/app/auth/effects/auth.effects.ts index 919a43e767..3d0146f086 100644 --- a/projects/example-app/src/app/auth/effects/auth.effects.ts +++ b/projects/example-app/src/app/auth/effects/auth.effects.ts @@ -17,7 +17,7 @@ import { LogoutConfirmationDialogComponent } from '@example-app/auth/components/ export class AuthEffects { login$ = createEffect(() => this.actions$.pipe( - ofType(LoginPageActions.login.type), + ofType(LoginPageActions.login), map(action => action.credentials), exhaustMap((auth: Credentials) => this.authService.login(auth).pipe( @@ -31,7 +31,7 @@ export class AuthEffects { loginSuccess$ = createEffect( () => this.actions$.pipe( - ofType(AuthApiActions.loginSuccess.type), + ofType(AuthApiActions.loginSuccess), tap(() => this.router.navigate(['/'])) ), { dispatch: false } @@ -40,7 +40,7 @@ export class AuthEffects { loginRedirect$ = createEffect( () => this.actions$.pipe( - ofType(AuthApiActions.loginRedirect.type, AuthActions.logout.type), + ofType(AuthApiActions.loginRedirect, AuthActions.logout), tap(authed => { this.router.navigate(['/login']); }) @@ -50,7 +50,7 @@ export class AuthEffects { logoutConfirmation$ = createEffect(() => this.actions$.pipe( - ofType(AuthActions.logoutConfirmation.type), + ofType(AuthActions.logoutConfirmation), exhaustMap(() => { const dialogRef = this.dialog.open< LogoutConfirmationDialogComponent, @@ -70,7 +70,7 @@ export class AuthEffects { ); constructor( - private actions$: Actions, + private actions$: Actions, private authService: AuthService, private router: Router, private dialog: MatDialog diff --git a/projects/example-app/src/app/books/effects/book.effects.ts b/projects/example-app/src/app/books/effects/book.effects.ts index ef20a5b22f..53c6d460aa 100644 --- a/projects/example-app/src/app/books/effects/book.effects.ts +++ b/projects/example-app/src/app/books/effects/book.effects.ts @@ -33,7 +33,7 @@ export class BookEffects { search$ = createEffect( () => ({ debounce = 300, scheduler = asyncScheduler } = {}) => this.actions$.pipe( - ofType(FindBookPageActions.searchBooks.type), + ofType(FindBookPageActions.searchBooks), debounceTime(debounce, scheduler), switchMap(({ query }) => { if (query === '') { @@ -41,7 +41,7 @@ export class BookEffects { } const nextSearch$ = this.actions$.pipe( - ofType(FindBookPageActions.searchBooks.type), + ofType(FindBookPageActions.searchBooks), skip(1) ); @@ -57,7 +57,7 @@ export class BookEffects { ); constructor( - private actions$: Actions, + private actions$: Actions, private googleBooks: GoogleBooksService ) {} } diff --git a/projects/example-app/src/app/books/effects/collection.effects.ts b/projects/example-app/src/app/books/effects/collection.effects.ts index d0646d7a7d..04a71c02c5 100644 --- a/projects/example-app/src/app/books/effects/collection.effects.ts +++ b/projects/example-app/src/app/books/effects/collection.effects.ts @@ -26,7 +26,7 @@ export class CollectionEffects { loadCollection$ = createEffect(() => this.actions$.pipe( - ofType(CollectionPageActions.loadCollection.type), + ofType(CollectionPageActions.loadCollection), switchMap(() => this.storageService.getCollection().pipe( map((books: Book[]) => @@ -42,7 +42,7 @@ export class CollectionEffects { addBookToCollection$ = createEffect(() => this.actions$.pipe( - ofType(SelectedBookPageActions.addBook.type), + ofType(SelectedBookPageActions.addBook), mergeMap(({ book }) => this.storageService.addToCollection([book]).pipe( map(() => CollectionApiActions.addBookSuccess({ book })), @@ -54,7 +54,7 @@ export class CollectionEffects { removeBookFromCollection$ = createEffect(() => this.actions$.pipe( - ofType(SelectedBookPageActions.removeBook.type), + ofType(SelectedBookPageActions.removeBook), mergeMap(({ book }) => this.storageService.removeFromCollection([book.id]).pipe( map(() => CollectionApiActions.removeBookSuccess({ book })), @@ -65,9 +65,7 @@ export class CollectionEffects { ); constructor( - private actions$: Actions< - SelectedBookPageActions.SelectedBookPageActionsUnion - >, + private actions$: Actions, private storageService: BookStorageService ) {} }