From fce534d1426dfc2a31221ed903e961e64d152673 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 15 Aug 2026 13:52:36 +0200 Subject: [PATCH] Fix missing loading indicator in benchmark component --- .../src/app/components/markets/markets.component.ts | 9 +++++++-- apps/client/src/app/components/markets/markets.html | 2 +- libs/ui/src/lib/benchmark/benchmark.component.html | 2 +- libs/ui/src/lib/benchmark/benchmark.component.ts | 11 +++++++---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/apps/client/src/app/components/markets/markets.component.ts b/apps/client/src/app/components/markets/markets.component.ts index 02a043c4a..f4cc79287 100644 --- a/apps/client/src/app/components/markets/markets.component.ts +++ b/apps/client/src/app/components/markets/markets.component.ts @@ -117,8 +117,13 @@ export class GfMarketsComponent implements OnInit { this.dataService .fetchBenchmarks() .pipe(takeUntilDestroyed(this.destroyRef)) - .subscribe(({ benchmarks }) => { - this.benchmarks.set(benchmarks); + .subscribe({ + error: () => { + this.benchmarks.set([]); + }, + next: ({ benchmarks }) => { + this.benchmarks.set(benchmarks); + } }); } diff --git a/apps/client/src/app/components/markets/markets.html b/apps/client/src/app/components/markets/markets.html index bd9013a00..2fb9c3246 100644 --- a/apps/client/src/app/components/markets/markets.html +++ b/apps/client/src/app/components/markets/markets.html @@ -56,7 +56,7 @@ [showSymbol]="false" [user]="user" /> - @if (benchmarks()?.length > 0) { + @if ((benchmarks()?.length ?? 0) > 0) {