Skip to content

Commit

Permalink
fix: initialize scannedUserCount
Browse files Browse the repository at this point in the history
  • Loading branch information
kawamataryo committed Feb 22, 2025
1 parent 3785464 commit ac968c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hooks/useRetrieveBskyUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,16 @@ export const useRetrieveBskyUsers = () => {
throw new Error(errorMessage);
}

setErrorMessage("");
await setUsers([]);
setScannedUserCount(0);
setLoading(true);

startRetrieveLoop(service).catch((e) => {
console.error(e);
setErrorMessage(e.message);
setLoading(false);
});
setErrorMessage("");
setLoading(true);
await setUsers([]);
}, []);

const restart = React.useCallback(() => {
Expand Down

0 comments on commit ac968c0

Please sign in to comment.