I am working on an Angular system that fetches data from the Pokemon TCG API. I am specifically interested in the "cards.images.small" attribute, which provides the image link for display. However, I am facing an issue where the cards are being displayed quadrupled instead of normally.
<div class="scroll">
<span class="font-extrabold text-3xl" style="color: #ffcb08;" *ngIf="spinner">Loading cards</span>
<table *ngIf="!spinner" mat-table [dataSource]="dataSource" class="mat-elevation-z8 mat-table">
<ng-container matColumnDef="position">
<th mat-header-cell *matHeaderCellDef></th>
<td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
</ng-container>
<ng-container matColumnDef="position2">
<th mat-header-cell *matHeaderCellDef></th>
<td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
</ng-container>
<ng-container matColumnDef="position3">
<th mat-header-cell *matHeaderCellDef></th>
<td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
</ng-container>
<ng-container matColumnDef="position4">
<th mat-header-cell *matHeaderCellDef></th>
<td (click)="addCard(element)" mat-cell *matCellDef="let element"> <img class="card" [src]="element.images?.small" alt=""> </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</div>
View the issue of quadrupled cards
Here is the desired display for the cards: desired