Skip to content

Commit

Permalink
Chore/Remote image placeholder (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t authored May 20, 2024
1 parent 6f07390 commit 68d7d87
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Sources/UI/SwiftUI/Views/RemoteImage/RemoteImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ public struct RemoteImage<Placeholder: View>: View {
}

public var body: some View {
KFImage(url)
.placeholder {
placeholder
}
.resizable()
.scaledToFill()
if let url {
KFImage(url)
.placeholder {
placeholder
}
.resizable()
.scaledToFill()
} else {
placeholder
}
}
}
#endif

0 comments on commit 68d7d87

Please sign in to comment.