In src/hooks/useRetry.ts, the run callback's success path does await fn(); setAttempt(0); return inside the for-loop, which exits the function before the trailing setLoading(false) after the loop is ever reached.
Any component relying on useRetry's loading flag to disable a button or show a spinner will have it stuck true forever after a successful call. Move setLoading(false) into a finally block or explicitly set it before each return.
In
src/hooks/useRetry.ts, theruncallback's success path doesawait fn(); setAttempt(0); returninside the for-loop, which exits the function before the trailingsetLoading(false)after the loop is ever reached.Any component relying on
useRetry'sloadingflag to disable a button or show a spinner will have it stucktrueforever after a successful call. MovesetLoading(false)into afinallyblock or explicitly set it before eachreturn.