diff --git a/frontend/src/hooks/use-async.tsx b/frontend/src/hooks/use-async.tsx index 3f5e819..a254ee1 100644 --- a/frontend/src/hooks/use-async.tsx +++ b/frontend/src/hooks/use-async.tsx @@ -26,7 +26,6 @@ export const useAsync: UseAsync = ( const execute = useCallback(() => { startTransition(() => { setPending(true); - setValue(initialValue); setError(null); }); @@ -34,7 +33,7 @@ export const useAsync: UseAsync = ( .then((response) => startTransition(() => setValue(response))) .catch((err) => startTransition(() => setError(err))) .finally(() => startTransition(() => setPending(false))); - }, [asyncFunction, initialValue]); + }, [asyncFunction]); // Call execute if we want to fire it right away. // Otherwise execute can be called later, such as