Skip to content

Commit

Permalink
Solved problem with details not showing in list, only in search. Had …
Browse files Browse the repository at this point in the history
…to do with the 'links.download' field of the image. Removed it and everything's working now.
  • Loading branch information
LuisLeandro94 committed Jun 18, 2021
1 parent 92d9860 commit 071c85a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions src/app/image-details/image-details.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<div class="row mx-1">
<div class="col-12 mb-0">
<div class="shadow-mb">
<a href="{{ dataStore.Image.download }}" target="_blank">
<img src="{{ dataStore.Image.regPath }}" class="img-fluid"
/></a>
<img src="{{ dataStore.Image.regPath }}" class="img-fluid" />
</div>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions src/app/services/image.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class ImageService {
image.urls.regular + '&fit=crop&w=500&h=500',
image.user.name,
null,
image.links.download,
null
);
resolve({ image: img });
Expand Down Expand Up @@ -110,7 +109,6 @@ export class ImageService {
image.urls.regular + '&fit=crop&w=500&h=500',
image.user.name,
arrayTags,
image.links.download,
data.downloads
);
resolve({ image: img });
Expand All @@ -128,7 +126,6 @@ export class ImageService {
regPath: string;
creator: string;
tags: string[];
download: string;
total_downloads: number;
}) {
this.insertFavorite(image);
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/image.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export class Image {
public regPath: string,
public creator: string,
public tags: string[] | null,
public download: string,
public total_downloads: number | null
) {}
}

0 comments on commit 071c85a

Please sign in to comment.