Skip to content

Commit e816262

Browse files
committed
Adds a placeholder for images in the top performers product row
1 parent 4dd446e commit e816262

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/MyStore/TopPerformersView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ struct TopPerformersRow: View {
6767
///
6868
let imageURL: URL?
6969

70+
/// Image placeholder.
71+
///
72+
let placeHolder = UIImage.productPlaceholderImage
73+
7074
/// Item name or title.
7175
///
7276
let name: String
@@ -92,6 +96,7 @@ struct TopPerformersRow: View {
9296
AdaptiveStack(horizontalAlignment: .leading, verticalAlignment: .top) {
9397
// Image
9498
KFImage(data.imageURL)
99+
.placeholder { Image(uiImage: data.placeHolder).foregroundColor(Color(.listIcon)) }
95100
.resizable()
96101
.frame(width: imageWidth, height: imageWidth)
97102
.cornerRadius(Layout.imageCornerRadius)

0 commit comments

Comments
 (0)