mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
fix invalid characters inputs
This commit is contained in:
parent
7ea3394c61
commit
b5bdf63e2e
@ -85,7 +85,10 @@ const steps = [
|
||||
setValidCharacters(hasValidCharacters(username))
|
||||
|
||||
const timer = setTimeout(async () => {
|
||||
if (!validCharacters) return
|
||||
if (!validCharacters) {
|
||||
setLoading(false)
|
||||
return
|
||||
}
|
||||
|
||||
const request = await app.api.customRequest("main", {
|
||||
method: "GET",
|
||||
@ -120,7 +123,7 @@ const steps = [
|
||||
autoCorrect="off"
|
||||
autoCapitalize="none"
|
||||
onPressEnter={submit}
|
||||
placeholder="@newuser"
|
||||
placeholder="newuser"
|
||||
value={username}
|
||||
onChange={handleUpdate}
|
||||
status={username.length == 0 ? "default" : loading ? "default" : (isValid() ? "success" : "error")}
|
||||
|
Loading…
x
Reference in New Issue
Block a user