Skip to content

Commit 089fe1c

Browse files
committed
fix(react): Add back arrow for forgot password form
1 parent 6083d72 commit 089fe1c

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

examples/react/src/routes.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,73 +15,79 @@ import MultiFactorAuthEnrollmentScreenPage from "./screens/mfa-enrollment-screen
1515
export const routes = [
1616
{
1717
name: "Sign In Screen",
18-
description: "A simple sign in screen with email and password",
18+
description: "A sign in screen with email and password.",
1919
path: "/screens/sign-in-auth-screen",
2020
component: SignInAuthScreenPage,
2121
},
2222
{
2323
name: "Sign In Screen (with handlers)",
24-
description: "A simple sign in screen with email and password, with forgot password and register handlers",
24+
description: "A sign in screen with email and password, with forgot password and register handlers.",
2525
path: "/screens/sign-in-auth-screen-w-handlers",
2626
component: SignInAuthScreenWithHandlersPage,
2727
},
2828
{
2929
name: "Sign In Screen (with OAuth)",
30-
description: "A simple sign in screen with email and password, with oAuth buttons",
30+
description: "A sign in screen with email and password, with oAuth buttons.",
3131
path: "/screens/sign-in-auth-screen-w-oauth",
3232
component: SignInAuthScreenWithOAuthPage,
3333
},
3434
{
3535
name: "Sign Up Screen",
36-
description: "A simple sign up screen with email and password",
36+
description: "A sign up screen with email and password.",
3737
path: "/screens/sign-up-auth-screen",
3838
component: SignUpAuthScreenPage,
3939
},
4040
{
4141
name: "Sign Up Screen (with handlers)",
42-
description: "A simple sign up screen with email and password, sign in handlers",
42+
description: "A sign up screen with email and password, sign in handlers.",
4343
path: "/screens/sign-up-auth-screen-w-handlers",
4444
component: SignUpAuthScreenWithHandlersPage,
4545
},
4646
{
4747
name: "Sign Up Screen (with OAuth)",
48-
description: "A simple sign in screen with email and password, with oAuth buttons",
48+
description: "A sign in screen with email and password, with oAuth buttons.",
4949
path: "/screens/sign-up-auth-screen-w-oauth",
5050
component: SignUpAuthScreenWithOAuthPage,
5151
},
5252
{
5353
name: "Email Link Auth Screen",
54-
description: "A screen allowing a user to send an email link for sign in",
54+
description: "A screen allowing a user to send an email link for sign in.",
5555
path: "/screens/email-link-auth-screen",
5656
component: EmailLinkAuthScreenPage,
5757
},
5858
{
5959
name: "Email Link Auth Screen (with OAuth)",
60-
description: "A screen allowing a user to send an email link for sign in, with oAuth buttons",
60+
description: "A screen allowing a user to send an email link for sign in, with oAuth buttons.",
6161
path: "/screens/email-link-auth-screen-w-oauth",
6262
component: EmailLinkAuthScreenWithOAuthPage,
6363
},
6464
{
6565
name: "Forgot Password Screen",
66-
description: "A screen allowing a user to reset their password",
66+
description: "A screen allowing a user to reset their password.",
6767
path: "/screens/forgot-password-auth-screen",
6868
component: ForgotPasswordAuthScreenPage,
6969
},
70+
{
71+
name: "Forgot Password Screen (with handlers)",
72+
description: "A screen allowing a user to reset their password, with forgot password and register handlers.",
73+
path: "/screens/forgot-password-auth-screen-w-handlers",
74+
component: ForgotPasswordAuthScreenPage,
75+
},
7076
{
7177
name: "OAuth Screen",
72-
description: "A screen which allows a user to sign in with OAuth only",
78+
description: "A screen which allows a user to sign in with OAuth only.",
7379
path: "/screens/oauth-screen",
7480
component: OAuthScreenPage,
7581
},
7682
{
7783
name: "Phone Auth Screen",
78-
description: "A screen allowing a user to sign in with a phone number",
84+
description: "A screen allowing a user to sign in with a phone number.",
7985
path: "/screens/phone-auth-screen",
8086
component: PhoneAuthScreenPage,
8187
},
8288
{
8389
name: "Phone Auth Screen (with OAuth)",
84-
description: "A screen allowing a user to sign in with a phone number, with oAuth buttons",
90+
description: "A screen allowing a user to sign in with a phone number, with oAuth buttons.",
8591
path: "/screens/phone-auth-screen-w-oauth",
8692
component: PhoneAuthScreenWithOAuthPage,
8793
},
@@ -90,7 +96,7 @@ export const routes = [
9096
export const hiddenRoutes = [
9197
{
9298
name: "MFA Enrollment Screen",
93-
description: "A screen allowing a user to enroll in multi-factor authentication",
99+
description: "A screen allowing a user to enroll in multi-factor authentication.",
94100
path: "/screens/mfa-enrollment-screen",
95101
component: MultiFactorAuthEnrollmentScreenPage,
96102
},

examples/react/src/screens/forgot-password-auth-screen-w-handlers.tsx

Whitespace-only changes.

packages/react/src/auth/forms/forgot-password-auth-form.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ describe("<ForgotPasswordAuthForm />", () => {
187187
</FirebaseUIProvider>
188188
);
189189

190-
const backToSignInButton = screen.getByRole("button", { name: "backToSignIn" });
190+
const backToSignInButton = screen.getByRole("button", { name: "backToSignIn" });
191191
expect(backToSignInButton).toBeInTheDocument();
192-
expect(backToSignInButton).toHaveTextContent("backToSignIn");
192+
expect(backToSignInButton).toHaveTextContent("backToSignIn");
193193

194194
// Make sure it's a button so it doesn't submit the form
195195
expect(backToSignInButton).toHaveAttribute("type", "button");

packages/react/src/auth/forms/forgot-password-auth-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function ForgotPasswordAuthForm({ onBackToSignInClick, onPasswordSent }:
102102
<form.ErrorMessage />
103103
</fieldset>
104104
{onBackToSignInClick ? (
105-
<form.Action onClick={onBackToSignInClick}>{getTranslation(ui, "labels", "backToSignIn")}</form.Action>
105+
<form.Action onClick={onBackToSignInClick}>&larr; {getTranslation(ui, "labels", "backToSignIn")}</form.Action>
106106
) : null}
107107
</form.AppForm>
108108
</form>

0 commit comments

Comments
 (0)