Skip to content

Commit

Permalink
Update alert
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi committed Jan 11, 2025
1 parent 06adabd commit 2337f92
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions LifeSpace/Map/LifeSpaceMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct LifeSpaceMapView: View {
@State private var presentedContext: EventContext?
@Binding private var presentingAccount: Bool

@State private var showingSurveyAlert = false
@State private var showingAlert = false
@State private var alertMessage = ""
@State private var showingSurvey = false
@State private var optionsPanelOpen = true
Expand Down Expand Up @@ -63,6 +63,13 @@ struct LifeSpaceMapView: View {
}
}
}
.alert("Error", isPresented: $showingAlert) {
Button("OK", role: .cancel) {
showingAlert = false
}
} message: {
Text(alertMessage)
}
.onAppear {
refreshMap()
}
Expand Down Expand Up @@ -116,7 +123,7 @@ struct LifeSpaceMapView: View {
try await locationModule.fetchLocations()
} catch {
alertMessage = error.localizedDescription
showingSurveyAlert = true
showingAlert = true
}
isRefreshing = false
}
Expand Down

0 comments on commit 2337f92

Please sign in to comment.