diff --git a/frontend/src/app/components/blocks-list/blocks-list.component.ts b/frontend/src/app/components/blocks-list/blocks-list.component.ts index 9bf4e9814..5270ee7be 100644 --- a/frontend/src/app/components/blocks-list/blocks-list.component.ts +++ b/frontend/src/app/components/blocks-list/blocks-list.component.ts @@ -81,11 +81,13 @@ export class BlocksList implements OnInit { }) ).subscribe(); + const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight'; + const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft'; + this.keyNavigationSubscription = this.stateService.keyNavigation$ .pipe( + filter((event) => event.key === prevKey || event.key === nextKey), tap((event) => { - const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight'; - const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft'; if (event.key === prevKey && this.page > 1) { this.page--; this.isLoading = true; diff --git a/frontend/src/app/components/liquid-reserves-audit/recent-pegs-list/recent-pegs-list.component.ts b/frontend/src/app/components/liquid-reserves-audit/recent-pegs-list/recent-pegs-list.component.ts index 31a52fd9d..d809f2fa0 100644 --- a/frontend/src/app/components/liquid-reserves-audit/recent-pegs-list/recent-pegs-list.component.ts +++ b/frontend/src/app/components/liquid-reserves-audit/recent-pegs-list/recent-pegs-list.component.ts @@ -73,11 +73,13 @@ export class RecentPegsListComponent implements OnInit { }), ).subscribe(); + const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight'; + const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft'; + this.keyNavigationSubscription = this.stateService.keyNavigation$ .pipe( + filter((event) => event.key === prevKey || event.key === nextKey), tap((event) => { - const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight'; - const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft'; if (event.key === prevKey && this.page > 1) { this.page--; this.isLoading = true;