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