From 35bb0fb8029eaec2a66f366b3fea51ba8a69840e Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Tue, 20 Dec 2022 14:34:07 -0800 Subject: [PATCH] Removed back() function --- src/app/shared/browse-by/browse-by.component.spec.ts | 11 ----------- src/app/shared/browse-by/browse-by.component.ts | 8 -------- 2 files changed, 19 deletions(-) diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index 43a3910216..95c0a8fb32 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -242,16 +242,5 @@ describe('BrowseByComponent', () => { expect(button).toBeDefined(); }); }); - describe('back', () => { - it('should navigate back to the main browse page', () => { - const id = 'test-pagination'; - comp.back(); - expect(paginationService.updateRoute).toHaveBeenCalledWith(id, {page: 1}, { - value: null, - startsWith: null, - [id + '.return']: null - }); - }); - }); }); diff --git a/src/app/shared/browse-by/browse-by.component.ts b/src/app/shared/browse-by/browse-by.component.ts index 79edf39096..2e8d2447b1 100644 --- a/src/app/shared/browse-by/browse-by.component.ts +++ b/src/app/shared/browse-by/browse-by.component.ts @@ -184,14 +184,6 @@ export class BrowseByComponent implements OnInit, OnDestroy { this.sub = this.routeService.getQueryParameterValue(this.paginationConfig.id + '.return').subscribe(this.previousPage$); } - /** - * Navigate back to the previous browse by page - */ - back() { - const page = +this.previousPage$.value > 1 ? +this.previousPage$.value : 1; - this.paginationService.updateRoute(this.paginationConfig.id, {page: page}, {[this.paginationConfig.id + '.return']: null, value: null, startsWith: null}); - } - ngOnDestroy(): void { if (this.sub) { this.sub.unsubscribe();