Skip to content

Commit 06ce414

Browse files
fix: back button email link
1 parent 262f4be commit 06ce414

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/EmailLinkView.swift

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ public struct EmailLinkView {
3434
extension EmailLinkView: View {
3535
public var body: some View {
3636
VStack {
37+
HStack {
38+
Button(action: {
39+
authService.authView = .authPicker
40+
}) {
41+
HStack(spacing: 4) {
42+
Image(systemName: "chevron.left")
43+
.font(.system(size: 17, weight: .medium))
44+
Text(authService.string.backButtonLabel)
45+
.font(.system(size: 17))
46+
}
47+
.foregroundColor(.blue)
48+
}
49+
.accessibilityIdentifier("email-link-back-button")
50+
51+
Spacer()
52+
}
53+
.padding(.horizontal)
54+
.padding(.top, 8)
3755
Text(authService.string.signInWithEmailLinkViewTitle)
3856
.accessibilityIdentifier("email-link-title-text")
3957
LabeledContent {
@@ -61,6 +79,7 @@ extension EmailLinkView: View {
6179
.frame(maxWidth: .infinity)
6280
.buttonStyle(.borderedProminent)
6381
Text(authService.errorMessage).foregroundColor(.red)
82+
Spacer()
6483
}.sheet(isPresented: $showModal) {
6584
VStack {
6685
Text(authService.string.signInWithEmailLinkViewMessage)
@@ -78,14 +97,6 @@ extension EmailLinkView: View {
7897
} catch {}
7998
}
8099
}
81-
.navigationBarItems(leading: Button(action: {
82-
authService.authView = .authPicker
83-
}) {
84-
Image(systemName: "chevron.left")
85-
.foregroundColor(.blue)
86-
Text(authService.string.backButtonLabel)
87-
.foregroundColor(.blue)
88-
}.accessibilityIdentifier("email-link-back-button"))
89100
}
90101
}
91102

0 commit comments

Comments
 (0)