Removed back() function

This commit is contained in:
Michael Spalti
2022-12-20 14:34:07 -08:00
parent 73a9e0b0bb
commit 35bb0fb802
2 changed files with 0 additions and 19 deletions

View File

@@ -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
});
});
});
});

View File

@@ -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();