Increase the debounce time on username validation

This commit is contained in:
Jackson Harper
2023-09-07 14:04:51 +08:00
parent 5ec5916cc8
commit 154b619d2d
2 changed files with 4 additions and 5 deletions

View File

@ -27,7 +27,7 @@ export function ConfirmProfileModal(): JSX.Element {
setUsername(event.target.value)
setTimeout(() => {
setDebouncedUsername(event.target.value)
}, 400)
}, 2000)
},
[]
)

View File

@ -18,9 +18,8 @@ export function EmailSignup(): JSX.Element {
const [password, setPassword] = useState<string | undefined>()
const [fullname, setFullname] = useState<string | undefined>()
const [username, setUsername] = useState<string | undefined>()
const [debouncedUsername, setDebouncedUsername] = useState<
string | undefined
>()
const [debouncedUsername, setDebouncedUsername] =
useState<string | undefined>()
const [errorMessage, setErrorMessage] = useState<string | undefined>()
useEffect(() => {
@ -41,7 +40,7 @@ export function EmailSignup(): JSX.Element {
setUsername(event.target.value)
setTimeout(() => {
setDebouncedUsername(event.target.value)
}, 400)
}, 2000)
},
[]
)