Skip to content

Commit 747ba8a

Browse files
fix: remove authservice from phone auth modal
1 parent 3a583ba commit 747ba8a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

FirebaseSwiftUI/FirebasePhoneAuthSwiftUI/Sources/Views/PhoneAuthView.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import SwiftUI
2626

2727
@MainActor
2828
public struct PhoneAuthView {
29-
@Environment(AuthService.self) private var authService
3029
@Environment(\.dismiss) private var dismiss
3130
@State private var errorMessage = ""
3231
@State private var phoneNumber = ""
@@ -68,7 +67,7 @@ extension PhoneAuthView: View {
6867
.bold()
6968

7069
LabeledContent {
71-
TextField(authService.string.enterPhoneNumberLabel, text: $phoneNumber)
70+
TextField("Enter phone number", text: $phoneNumber)
7271
.textInputAutocapitalization(.never)
7372
.disableAutocorrection(true)
7473
.submitLabel(.next)
@@ -97,14 +96,12 @@ extension PhoneAuthView: View {
9796
showVerificationCodeInput = true
9897
errorMessage = ""
9998
} catch {
100-
errorMessage = authService.string.localizedErrorMessage(
101-
for: error
102-
)
99+
errorMessage = error.localizedDescription
103100
}
104101
isProcessing = false
105102
}
106103
}) {
107-
Text(authService.string.smsCodeSendButtonLabel)
104+
Text("Send Code")
108105
.padding(.vertical, 8)
109106
.frame(maxWidth: .infinity)
110107
}
@@ -144,7 +141,7 @@ extension PhoneAuthView: View {
144141
.font(.title2)
145142
.bold()
146143

147-
TextField(authService.string.phoneNumberVerificationCodeLabel, text: $verificationCode)
144+
TextField("Verification Code", text: $verificationCode)
148145
.keyboardType(.numberPad)
149146
.padding()
150147
.background(Color(.systemGray6))
@@ -167,7 +164,7 @@ extension PhoneAuthView: View {
167164
dismiss()
168165
}
169166
}) {
170-
Text(authService.string.verifyPhoneNumberAndSignInLabel)
167+
Text("Verify and Sign In")
171168
.foregroundColor(.white)
172169
.padding()
173170
.frame(maxWidth: .infinity)

0 commit comments

Comments
 (0)