fix alert having like 2 cancel buttons

This commit is contained in:
neon443 committed 2025-06-19 09:48:07 +01:00
1 parent 3ee22da036
commit c393404fec
1 file changed
+3 -3
+3 -3
View File
@@ -15,7 +15,7 @@ struct ImportView: View {
@State private var text: String = "Ready..."
@State private var fgColor: Color = .yellow
@State private var showAlert: Bool = true
@State private var showAlert: Bool = false
@State private var replaceCurrentEvents: Bool = false
@@ -66,17 +66,17 @@ struct ImportView: View {
fgColor = .yellow
}
}
.blur(radius: showAlert ? 2 : 0)
.alert("Are you sure?", isPresented: $showAlert) {
Button(role: .destructive) {
importEvents()
} label: {
Text("Replace Events")
}
Button(role: .cancel) {
Button() {
importEvents()
} label: {
Text("Add to Events")
.foregroundStyle(.one)
}
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.