diff --git a/src/app/components/bars/bars.component.ts b/src/app/components/bars/bars.component.ts index 361e844daaee755f2ad55ea64b960c9a7bf85f52..3ef3a2e2bd59e6a6fc492bb5eb4facc086771191 100644 --- a/src/app/components/bars/bars.component.ts +++ b/src/app/components/bars/bars.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; +import { EMPTY, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { Bar } from '../../share/models/bar.model'; import { BarsService } from '../../share/services/bars.service'; @@ -17,12 +17,12 @@ export class BarsComponent implements OnInit { ngOnInit(): void { this.barsService.getAllBars().pipe( map((bars: Bar[]) => { - console.log(bars); this.bars = bars; }), - catchError((err) => { - console.log(err); - }) + catchError((error: any) => { + return EMPTY; + } + ), ); } } diff --git a/src/app/share/store/effects/bars.effects.ts b/src/app/share/store/effects/bars.effects.ts index 7205155c14b815a220d64e679261aeee8b6cab25..ac47639c80c8905bf2d2a03019dd5ca57b410825 100644 --- a/src/app/share/store/effects/bars.effects.ts +++ b/src/app/share/store/effects/bars.effects.ts @@ -24,9 +24,6 @@ export class BarsEffect { }), map((bars: Bar[]) => { return new FetchBarsSuccess(bars); - }), - // catchError((err) => { - // console.log(err); - // }) + }) ); } \ No newline at end of file diff --git a/src/app/share/store/reducers/bars.reducers.ts b/src/app/share/store/reducers/bars.reducers.ts index 7c29c8859d9b441f0cb1bb29f0632a951eb29a89..4f81a013b9cf077c12b97257ef1dfc2bcda7f76f 100644 --- a/src/app/share/store/reducers/bars.reducers.ts +++ b/src/app/share/store/reducers/bars.reducers.ts @@ -1,5 +1,3 @@ -import { PhotosAction, PhotosActionsTypes } from "./photos.actions"; -import { Photo } from "../models/photo.model"; import { Bar } from "../../models/bar.model"; import { BarsAction, BarsActionsTypes } from "../actions/bars.actions";