Remove individual spinners from dashboard page

This commit is contained in:
aditya.chandel
2025-03-11 22:55:54 -06:00
parent cb1d93b191
commit e11bd81281
2 changed files with 4 additions and 22 deletions
@@ -1,17 +1,13 @@
<p class="dashboard-scroller-title">{{ title }}</p>
<div *ngIf="isLoading">
<p-progressSpinner></p-progressSpinner>
</div>
<div class="dashboard-scroller-no-books" *ngIf="!isLoading && (!books || books.length === 0)">
<div class="dashboard-scroller-no-books" *ngIf="!books || books.length === 0">
<p class="text-sm">
{{ bookListType === 'lastRead' ? "You haven't read any books yet!" : "No books have been added to BookLore!" }}
</p>
</div>
<div class="dashboard-scroller-infinite"
*ngIf="!isLoading && books"
*ngIf="books"
infiniteScroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="50"
@@ -24,6 +20,6 @@
</div>
<div *ngIf="!isLoading && books === null">
<div *ngIf=" books === null">
<p class="text-sm">Failed to load books! :(</p>
</div>
@@ -18,7 +18,7 @@ import {Book} from '../../../book/model/book.model';
],
standalone: true
})
export class DashboardScrollerComponent implements OnInit, OnChanges {
export class DashboardScrollerComponent {
@Input() bookListType: 'lastRead' | null = null;
@Input() title: string = 'Last Read Books';
@@ -26,18 +26,4 @@ export class DashboardScrollerComponent implements OnInit, OnChanges {
@ViewChild('scrollContainer') scrollContainer!: ElementRef;
isLoading = true;
ngOnInit(): void {
if (this.books !== undefined) {
this.isLoading = false;
}
}
ngOnChanges(): void {
if (this.books !== undefined) {
this.isLoading = false;
}
}
}