diff --git a/ui/src/app/library/library.component.spec.ts b/ui/src/app/library/library.component.spec.ts index b52868f..9485c60 100644 --- a/ui/src/app/library/library.component.spec.ts +++ b/ui/src/app/library/library.component.spec.ts @@ -8,12 +8,10 @@ import { ImageService } from '../services/image.service'; import { routes } from '../app.routes'; function makeActivatedRoute(queryParams: Record = {}) { + const paramMap = { get: (key: string) => queryParams[key] ?? null }; return { - snapshot: { - queryParamMap: { - get: (key: string) => queryParams[key] ?? null, - }, - }, + snapshot: { queryParamMap: paramMap }, + queryParamMap: of(paramMap), }; } diff --git a/ui/src/app/library/library.component.ts b/ui/src/app/library/library.component.ts index b987847..b1ecd74 100644 --- a/ui/src/app/library/library.component.ts +++ b/ui/src/app/library/library.component.ts @@ -6,7 +6,7 @@ import { } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Router, RouterLink, ActivatedRoute } from '@angular/router'; -import { Subject, debounceTime, distinctUntilChanged, share, timer } from 'rxjs'; +import { Subject, debounceTime, distinctUntilChanged, share, skip, timer } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { ImageRecord, ImageService } from '../services/image.service'; import { TagService } from '../services/tag.service'; @@ -21,7 +21,7 @@ const PLACEHOLDER_SVG = `data:image/svg+xml,
-

Reactbin

+

Reactbin

Browse tags @@ -118,7 +118,8 @@ const PLACEHOLDER_SVG = `data:image/svg+xml,