Skip to content

Commit

Permalink
FIX: enhance projects list with loading state and no projects found m…
Browse files Browse the repository at this point in the history
…essage
  • Loading branch information
anuradhawick committed Dec 9, 2024
1 parent f9c0cc9 commit 9940e6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@if (loading) {
<app-component-spinner [loading]="true" class="min-h-[400px] block" />
} @else {
<app-component-spinner [loading]="loading" />
@if (dataSource.data.length > 0) {
<br />
<table mat-table [dataSource]="dataSource">
<!-- Name Column -->
Expand Down Expand Up @@ -66,6 +65,8 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
} @else {
<h3>No projects found</h3>
}
<br />
<div class="flex flex-row space-x-[10px] items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export class ProjectsListComponent {
}

list() {
this.loading = true;
this.dataSource.data = [];
this.dps
.getAdminProjects()
.pipe(catchError(() => of(null)))
Expand Down

0 comments on commit 9940e6b

Please sign in to comment.