Skip to content

Commit

Permalink
fix(signup): fix password strength useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
tfkhdyt committed Jul 7, 2024
1 parent 8a18059 commit cd13a03
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/app/auth/sign-up/signup-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@ const usePasswordStrength = (password: string) => {
const deferredPassword = useDebounce(password, 500);

useEffect(() => {
const calculatePwdStrength = async (pwd: string) => {
const response = await zxcvbnAsync(pwd);
setResult(response);
};

if (deferredPassword) {
calculatePwdStrength(deferredPassword);
zxcvbnAsync(deferredPassword).then((response) => setResult(response));
}
}, [deferredPassword]);

Expand Down

0 comments on commit cd13a03

Please sign in to comment.