making things smoother and such with button for continuation on add basic info page
This commit is contained in:
@@ -147,7 +147,10 @@ final class AuthSessionStore: ObservableObject, SessionStore {
|
||||
|
||||
// if we get a user back, then set this to our instance to allow UI to get published with all user details
|
||||
if firestoreUser != nil {
|
||||
self.user = firestoreUser
|
||||
// TODO: prolly useless since we never set up a background thread for the rest of this code before
|
||||
DispatchQueue.main.async {
|
||||
self.user = firestoreUser
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,11 @@ struct AddBasicInfoView: View {
|
||||
|
||||
// button to save information
|
||||
Button {
|
||||
if self.firstName.count == 0 || self.lastName.count == 0 {
|
||||
print("do nothing...user didn't input anything...maybe show an alert")
|
||||
return
|
||||
}
|
||||
|
||||
print("saving information")
|
||||
|
||||
// activate loading splashscreen
|
||||
@@ -119,12 +124,11 @@ struct AddBasicInfoView: View {
|
||||
.foregroundColor(Color.white)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 20)
|
||||
.background(NirvanaColor.teal)
|
||||
.background(self.firstName.count == 0 || self.lastName.count == 0 ? Color.white.opacity(0.3) : NirvanaColor.teal)
|
||||
.clipShape(Capsule())
|
||||
.shadow(radius:10)
|
||||
}
|
||||
.offset(x: 0, y: self.firstName.count == 0 || self.lastName.count == 0 ? 200 : 0)
|
||||
.animation(.spring())
|
||||
.animation(.default)
|
||||
.padding()
|
||||
}
|
||||
.frame(maxHeight: .infinity)
|
||||
|
||||
Reference in New Issue
Block a user