We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e0a6611 + ad7eed1 commit 0d5851eCopy full SHA for 0d5851e
1 file changed
Uplift/Views/Home/HomeGymCell.swift
@@ -188,10 +188,17 @@ struct HomeGymCell: View {
188
}
189
190
191
+ @ViewBuilder
192
private var distanceText: some View {
- Text("\(locationManager.distanceToCoordinates(latitude: gym.latitude, longitude: gym.longitude)) mi")
193
- .font(Constants.Fonts.labelMedium)
194
- .foregroundStyle(Constants.Colors.gray03)
+ if locationManager.userLocation != nil {
+ Text("\(locationManager.distanceToCoordinates(latitude: gym.latitude, longitude: gym.longitude)) mi")
195
+ .font(Constants.Fonts.labelMedium)
196
+ .foregroundStyle(Constants.Colors.gray03)
197
+ } else {
198
+ Text("")
199
200
201
+ }
202
203
204
0 commit comments