Skip to content

Commit 0ae3943

Browse files
committed
Fix guidance
1 parent 10f3215 commit 0ae3943

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

MyLibrary/Sources/GuidanceFeature/Guidance.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public struct GuidanceView: View {
202202
}
203203
.buttonStyle(.borderedProminent)
204204
.padding(.horizontal)
205-
// directions
205+
directions
206206
venueInfo
207207
.padding()
208208
}
@@ -283,10 +283,12 @@ public struct GuidanceView: View {
283283
Text(direction.description, bundle: .module)
284284
}
285285
.frame(maxWidth: .infinity, alignment: .leading)
286-
Image(direction.imageName, bundle: .module)
287-
.resizable()
288-
.aspectRatio(contentMode: .fit)
289-
.frame(maxWidth: 400)
286+
if let imageName = direction.imageName {
287+
Image(imageName, bundle: .module)
288+
.resizable()
289+
.aspectRatio(contentMode: .fit)
290+
.frame(maxWidth: 400)
291+
}
290292
}
291293
.padding()
292294
}

MyLibrary/Sources/GuidanceFeature/Lines.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ enum Lines: Equatable, Identifiable, CaseIterable {
8686
switch self {
8787
case .tachikawa:
8888
return [
89-
.init(order: 1, description: "tachikawa-1", imageName: "")
89+
.init(order: 1, description: "tachikawa-1")
9090
]
9191
case .haneda:
9292
return [
93-
.init(order: 1, description: "haneda-1", imageName: "")
93+
.init(order: 1, description: "haneda-1")
9494
]
9595
case .tokyo:
9696
return [
97-
.init(order: 1, description: "tokyo-1", imageName: "")
97+
.init(order: 1, description: "tokyo-1")
9898
]
9999
}
100100
}
@@ -114,6 +114,6 @@ enum Lines: Equatable, Identifiable, CaseIterable {
114114
var id: UUID { .init() }
115115
var order: Int
116116
var description: LocalizedStringKey
117-
var imageName: String
117+
var imageName: String?
118118
}
119119
}

0 commit comments

Comments
 (0)