Update PhoneVerificationView.swift
This commit is contained in:
@@ -39,10 +39,11 @@ struct PhoneVerificationView: View {
|
|||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
// tell people that we only support the United States
|
// tell people that we only support the United States
|
||||||
|
self.toastText = "🇺🇸 Only U.S. supported, more countries coming soon!"
|
||||||
self.showToast.toggle()
|
self.showToast.toggle()
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField("(949) 292 - 2192", text: $phoneNumber)
|
TextField("(650) 555 - 1234", text: $phoneNumber)
|
||||||
.padding()
|
.padding()
|
||||||
.background(.ultraThinMaterial)
|
.background(.ultraThinMaterial)
|
||||||
.clipShape(Capsule())
|
.clipShape(Capsule())
|
||||||
@@ -116,16 +117,11 @@ struct PhoneVerificationView: View {
|
|||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.popup(isPresented: self.$showToast, type: .toast, position: .bottom, autohideIn: 2) {
|
.alert(isPresented: self.$showToast) {
|
||||||
VStack {
|
Alert(
|
||||||
Text(self.toastText)
|
title: Text(self.toastText),
|
||||||
.padding()
|
dismissButton: .default(Text("Got it!"))
|
||||||
.background(.ultraThinMaterial)
|
)
|
||||||
.cornerRadius(30)
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundColor(Color.red)
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -231,7 +227,6 @@ struct PhoneVerificationCodeView: View {
|
|||||||
.alert(isPresented: self.$showToast) {
|
.alert(isPresented: self.$showToast) {
|
||||||
Alert(
|
Alert(
|
||||||
title: Text(self.toastText),
|
title: Text(self.toastText),
|
||||||
message: Text("Go back and try again or re-enter phone number."),
|
|
||||||
dismissButton: .default(Text("Got it!"))
|
dismissButton: .default(Text("Got it!"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user