Don't perform fetch more than once.

This commit is contained in:
0x1eef 2023-09-29 13:48:29 -03:00
parent 0a1f1d8769
commit 5f59c2ffe2

View file

@ -22,7 +22,7 @@ export function useWebService(): [Maybe<TResponse>, Maybe<Error>] {
.then(receive) .then(receive)
.then((json) => setResponse(Response(json))) .then((json) => setResponse(Response(json)))
.catch((err) => setError(err)); .catch((err) => setError(err));
}); }, []);
return [response, error]; return [response, error];
} }