diff --git a/packages/stack/src/components-page/forgot-password.tsx b/packages/stack/src/components-page/forgot-password.tsx index 314559cbd..4cf1ac976 100644 --- a/packages/stack/src/components-page/forgot-password.tsx +++ b/packages/stack/src/components-page/forgot-password.tsx @@ -3,7 +3,7 @@ import { yupResolver } from "@hookform/resolvers/yup"; import { yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields"; import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises"; -import { Button, Input, Label, StyledLink, Typography } from "@stackframe/stack-ui"; +import { Button, Input, Label, StyledLink, Typography, cn } from "@stackframe/stack-ui"; import { useState } from "react"; import { useForm } from "react-hook-form"; import * as yup from "yup"; @@ -76,16 +76,23 @@ export function ForgotPassword(props: { fullPage?: boolean }) { return ( -
- {t("Reset Your Password")} - - {t("Don't need to reset?")}{" "} - - {t("Sign in")} - - +
+
+ {t("Reset Your Password")} + + {t("Don't need to reset?")}{" "} + + {t("Sign in")} + + +
+
+ setSent(true)} /> +
- setSent(true)} /> ); }; diff --git a/packages/stack/src/components-page/password-reset.tsx b/packages/stack/src/components-page/password-reset.tsx index 5641ccf26..24c1494c5 100644 --- a/packages/stack/src/components-page/password-reset.tsx +++ b/packages/stack/src/components-page/password-reset.tsx @@ -6,7 +6,7 @@ import { getPasswordError } from "@stackframe/stack-shared/dist/helpers/password import { yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields"; import { cacheFunction } from "@stackframe/stack-shared/dist/utils/caches"; import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises"; -import { Button, Label, PasswordInput, Typography } from "@stackframe/stack-ui"; +import { Button, Label, PasswordInput, Typography, cn } from "@stackframe/stack-ui"; import React, { useState } from "react"; import { useForm } from "react-hook-form"; import * as yup from "yup"; @@ -74,43 +74,49 @@ export default function PasswordResetForm(props: { ); } + return ( -
- {t("Reset Your Password")} +
+
+ {t("Reset Your Password")} +
+ +
runAsynchronouslyWithAlert(handleSubmit(onSubmit)(e))} + noValidate + > + + { + clearErrors('password'); + clearErrors('passwordRepeat'); + }} + /> + + + + { + clearErrors('password'); + clearErrors('passwordRepeat'); + }} + /> + + + +
- -
runAsynchronouslyWithAlert(handleSubmit(onSubmit)(e))} - noValidate - > - - { - clearErrors('password'); - clearErrors('passwordRepeat'); - }} - /> - - - - { - clearErrors('password'); - clearErrors('passwordRepeat'); - }} - /> - - - - ); }