Skip to content

Commit

Permalink
[cleanup] rename debounced function name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniebeggs committed Apr 25, 2024
1 parent 58cbc45 commit 524d6e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/(BottomTabNavigation)/QRCodeScanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function QRCodeScannerScreen() {
Toast.hide();
}

const debouncedFetchData = useCallback(debounce(resetScanner, 1500), []);
const debouncedResetScanner = useCallback(debounce(resetScanner, 1500), []);

// function called after every `BarCodeScanningResult` event triggered by scanner
async function handleBarCodeScanned(result: BarCodeScanningResult) {
Expand Down Expand Up @@ -136,7 +136,7 @@ function QRCodeScannerScreen() {
break;
}
}
debouncedFetchData();
debouncedResetScanner();
}

async function processBarCodeData(data: string) {
Expand Down

0 comments on commit 524d6e1

Please sign in to comment.