Fixed useSend loading flow on abort

Made data null on error
Made it remain in loading state on refetch and remount abortion
This commit is contained in:
2023-08-12 01:32:02 +03:00
parent 3bf00cea6a
commit b12f19ac51
5 changed files with 60 additions and 29 deletions

View File

@ -20,7 +20,7 @@ function useSignIn() {
body: formData,
})
if (token !== undefined) {
if (token !== null && token !== undefined) {
setToken(token)
return true