Skip to content

Commit

Permalink
🔧 Nothing is displayed when side event images cannot be loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corvus400 committed Sep 12, 2023
1 parent f5e04b0 commit b0a15c6
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions app-ios/Modules/Sources/FloorMap/SideEventRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,22 @@ struct SideEventRow: View {
Spacer(minLength: 0)

// Image
Group {
if let imageLink = sideEvent.imageLink, let imageUrl = URL(string: imageLink) {
if let imageLink = sideEvent.imageLink, let imageUrl = URL(string: imageLink) {
Group {
CacheAsyncImage(url: imageUrl) { image in
image.resizable()
} placeholder: {
Color.gray
}
} else {
Color.gray
}
.frame(width: 88, height: 88)
.scaledToFill()
.clipShape(RoundedRectangle(cornerRadius: 12))
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(AssetColors.Outline.outline.swiftUIColor, lineWidth: 1)
)
}
.frame(width: 88, height: 88)
.scaledToFill()
.clipShape(RoundedRectangle(cornerRadius: 12))
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(AssetColors.Outline.outline.swiftUIColor, lineWidth: 1)
)
}
}
}
Expand Down

0 comments on commit b0a15c6

Please sign in to comment.