From 5a555f503fa0c2939848f8c6ca9d02941da4f78f Mon Sep 17 00:00:00 2001 From: Adrian Nads Date: Sun, 16 Jul 2023 23:10:20 +0800 Subject: [PATCH] FIXED the loading state of button at AddUser --- src/components/AddUser.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddUser.jsx b/src/components/AddUser.jsx index 5fa71de..5b945bd 100644 --- a/src/components/AddUser.jsx +++ b/src/components/AddUser.jsx @@ -34,7 +34,7 @@ function AddUser() { const submit = async () => { - setLoading(false); + setLoading(true); try { const response = await axios.post(`${import.meta.env.PROD ? import.meta.env.VITE_PROD_SERVER : import.meta.env.VITE_DEV_SERVER}/users/add`, getValues())