fix: address PR review feedback on password suggestions

Remove redundant tests, rename requirement translations to suggestion for clearer i18n, simplify password input state and requirement display.
This commit is contained in:
Thomas Camlong committed 2026-05-29 11:16:07 +02:00
1 parent 0df64f05e5
commit f1ed293b79
41 files changed
+50 -94

No files matched your search

@@ -20,16 +20,15 @@ export const CustomPasswordInput = ({ withPasswordRequirements, ...props }: Cust
};
const WithPasswordRequirements = (props: PasswordInputProps) => {
const [internalValue, setInternalValue] = useState("");
const password = props.value ?? internalValue;
const [password, setPassword] = useState("");
const onChange = (event: ChangeEvent<HTMLInputElement>) => {
setInternalValue(event.currentTarget.value);
setPassword(event.currentTarget.value);
props.onChange?.(event);
};
return (
<PasswordRequirementsPopover password={String(password)}>
<PasswordRequirementsPopover password={password}>
<PasswordInput {...props} onChange={onChange} />
</PasswordRequirementsPopover>
);