Refactor password sign-up flow and improve form usability (#131)
- Extracted sign-up logic into a new `usePasswordSignUpFlow` hook - Simplified `EmailPasswordSignUpContainer` component - Added `autoComplete="new-password"` to password input for better UX - Converted `PasswordSignUpForm` props to a TypeScript interface
This commit is contained in:
committed by
GitHub
parent
5622572f36
commit
001903ddac
@@ -22,12 +22,7 @@ import { Trans } from '@kit/ui/trans';
|
||||
import { PasswordSignUpSchema } from '../schemas/password-sign-up.schema';
|
||||
import { TermsAndConditionsFormField } from './terms-and-conditions-form-field';
|
||||
|
||||
export function PasswordSignUpForm({
|
||||
defaultValues,
|
||||
displayTermsCheckbox,
|
||||
onSubmit,
|
||||
loading,
|
||||
}: {
|
||||
interface PasswordSignUpFormProps {
|
||||
defaultValues?: {
|
||||
email: string;
|
||||
};
|
||||
@@ -40,7 +35,14 @@ export function PasswordSignUpForm({
|
||||
repeatPassword: string;
|
||||
}) => unknown;
|
||||
loading: boolean;
|
||||
}) {
|
||||
}
|
||||
|
||||
export function PasswordSignUpForm({
|
||||
defaultValues,
|
||||
displayTermsCheckbox,
|
||||
onSubmit,
|
||||
loading,
|
||||
}: PasswordSignUpFormProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const form = useForm({
|
||||
@@ -96,6 +98,7 @@ export function PasswordSignUpForm({
|
||||
required
|
||||
data-test={'password-input'}
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
placeholder={''}
|
||||
{...field}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user