making things smoother and such with button for continuation on add basic info page

This commit is contained in:
talksik
2021-12-18 20:22:41 -08:00
parent 48c433a7a3
commit c506853358
2 changed files with 11 additions and 4 deletions
@@ -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)