basic phone input page but not workking with nav
This commit is contained in:
@@ -6,26 +6,34 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import NavigationStack
|
||||||
|
|
||||||
// user can type in a phone number and then receive a text
|
// user can type in a phone number and then receive a text
|
||||||
struct PhoneVerificationView: View {
|
struct PhoneVerificationView: View {
|
||||||
@State var phoneNumber = ""
|
@State var phoneNumber = ""
|
||||||
|
@EnvironmentObject private var navigationStack: NavigationStack
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack(alignment: .topLeading) {
|
||||||
|
Color.clear
|
||||||
|
|
||||||
OnboardingTemplateView(hdrText: "Let's get you verified", imgName: "undraw_my_password_d-6-kg", bottomActArea: AnyView(
|
OnboardingTemplateView(hdrText: "Let's get you verified", imgName: "undraw_my_password_d-6-kg", bottomActArea: AnyView(
|
||||||
VStack {
|
VStack {
|
||||||
TextField("enter phone number", text: $phoneNumber)
|
HStack {
|
||||||
.background(Color.white)
|
TextField("enter phone number", text: $phoneNumber)
|
||||||
|
.background(Color.white.opacity(0.5))
|
||||||
|
|
||||||
|
TextField("enter phone number", text: $phoneNumber)
|
||||||
|
.background(Color.white.opacity(0.5))
|
||||||
|
}
|
||||||
|
.padding(.vertical, 20)
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
print("send verification")
|
print("send verification")
|
||||||
|
|
||||||
|
self.navigationStack.pop() // goes back to welcome screen
|
||||||
} label: {
|
} label: {
|
||||||
Text("send verification")
|
Text("Send Verification")
|
||||||
.bold()
|
.bold()
|
||||||
.foregroundColor(NirvanaColor.white)
|
.foregroundColor(NirvanaColor.white)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
@@ -36,6 +44,17 @@ struct PhoneVerificationView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
|
//back button to home
|
||||||
|
Button {
|
||||||
|
print("going back to last page")
|
||||||
|
|
||||||
|
} label: {
|
||||||
|
Label("Back", systemImage: "chevron.left")
|
||||||
|
.labelStyle(.iconOnly)
|
||||||
|
.foregroundColor(NirvanaColor.teal)
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ struct OnboardingTemplateView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
|
// TODO: CAREFUL...this needs to be on top if any view is using this subview...otherwise elements will be dimmed and placed beneath this background
|
||||||
WavesGlassBackgroundView()
|
WavesGlassBackgroundView()
|
||||||
|
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
|
|||||||
@@ -6,15 +6,19 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import NavigationStack
|
||||||
|
|
||||||
struct WelcomeView: View {
|
struct WelcomeView: View {
|
||||||
@State var showLearnMore = false
|
@State var showLearnMore = false
|
||||||
|
@EnvironmentObject private var navigationStack: NavigationStack
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
|
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
Button {
|
Button {
|
||||||
print("going to the sign in page")
|
print("going to the sign in page")
|
||||||
|
|
||||||
|
self.navigationStack.push(PhoneVerificationView())
|
||||||
} label: {
|
} label: {
|
||||||
Text("Start Your Detox")
|
Text("Start Your Detox")
|
||||||
.bold()
|
.bold()
|
||||||
|
|||||||
Reference in New Issue
Block a user