diff --git a/apps/client/src/app/components/home-market/home-market.component.ts b/apps/client/src/app/components/home-market/home-market.component.ts
index 3a42a9ebc..3480eaeb7 100644
--- a/apps/client/src/app/components/home-market/home-market.component.ts
+++ b/apps/client/src/app/components/home-market/home-market.component.ts
@@ -29,7 +29,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
public hasPermissionToAccessFearAndGreedIndex: boolean;
public historicalDataItems: HistoricalDataItem[];
public info: InfoItem;
- public isLoading = true;
public readonly numberOfDays = 365;
public user: User;
@@ -43,7 +42,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
) {
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.info = this.dataService.fetchInfo();
- this.isLoading = true;
this.userService.stateChanged
.pipe(takeUntil(this.unsubscribeSubject))
@@ -89,7 +87,6 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(({ benchmarks }) => {
this.benchmarks = benchmarks;
- this.isLoading = false;
this.changeDetectorRef.markForCheck();
});
diff --git a/apps/client/src/app/components/home-market/home-market.html b/apps/client/src/app/components/home-market/home-market.html
index c362fdd18..2fcdb5716 100644
--- a/apps/client/src/app/components/home-market/home-market.html
+++ b/apps/client/src/app/components/home-market/home-market.html
@@ -36,16 +36,6 @@
[locale]="user?.settings?.locale || undefined"
[user]="user"
/>
- @if (isLoading) {
-
- }
diff --git a/apps/client/src/app/components/home-market/home-market.module.ts b/apps/client/src/app/components/home-market/home-market.module.ts
index bc35b4bef..b8e6582a5 100644
--- a/apps/client/src/app/components/home-market/home-market.module.ts
+++ b/apps/client/src/app/components/home-market/home-market.module.ts
@@ -4,7 +4,6 @@ import { GfLineChartComponent } from '@ghostfolio/ui/line-chart';
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
-import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { HomeMarketComponent } from './home-market.component';
@@ -15,8 +14,7 @@ import { HomeMarketComponent } from './home-market.component';
CommonModule,
GfBenchmarkComponent,
GfFearAndGreedIndexModule,
- GfLineChartComponent,
- NgxSkeletonLoaderModule
+ GfLineChartComponent
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
diff --git a/libs/ui/src/lib/benchmark/benchmark.component.html b/libs/ui/src/lib/benchmark/benchmark.component.html
index ec92554de..8867e1c9e 100644
--- a/libs/ui/src/lib/benchmark/benchmark.component.html
+++ b/libs/ui/src/lib/benchmark/benchmark.component.html
@@ -122,3 +122,18 @@
"
>
+
+@if (isLoading) {
+
+} @else if (benchmarks?.length === 0) {
+
+ No data available
+
+}
diff --git a/libs/ui/src/lib/benchmark/benchmark.component.ts b/libs/ui/src/lib/benchmark/benchmark.component.ts
index 764d65c2c..22bc9a128 100644
--- a/libs/ui/src/lib/benchmark/benchmark.component.ts
+++ b/libs/ui/src/lib/benchmark/benchmark.component.ts
@@ -49,6 +49,7 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
@Input() user: User;
public displayedColumns = ['name', 'date', 'change', 'marketCondition'];
+ public isLoading = true;
public resolveMarketCondition = resolveMarketCondition;
public translate = translate;
@@ -76,6 +77,10 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy {
}
public ngOnChanges() {
+ if (this.benchmarks) {
+ this.isLoading = false;
+ }
+
if (this.user?.settings?.isExperimentalFeatures) {
this.displayedColumns = [
'name',