Files
Cursor Agent 9d24bfb15f fix: use useRef instead of useState for QR scanner lock to prevent duplicate scans
The scannerLocked state was captured in handleQrScan's closure, so rapid
native barcode scanner callbacks before React re-renders would all see
false, bypassing the guard. Switching to a useRef ensures the lock value
is read synchronously, reliably preventing duplicate scan processing.
2026-04-14 21:07:07 +00:00
..