Skip to content

Fix Duplicate Attendance Scan Confirmation - #468

Open
raj1246 wants to merge 1 commit into
fed-tech:betafrom
raj1246:fix/attendance-confirmation
Open

Fix Duplicate Attendance Scan Confirmation#468
raj1246 wants to merge 1 commit into
fed-tech:betafrom
raj1246:fix/attendance-confirmation

Conversation

@raj1246

@raj1246 raj1246 commented Jul 25, 2026

Copy link
Copy Markdown

Description

This PR resolves the issue where scanning a participant's QR code resulted in multiple success/error notifications and multiple attendance API requests being triggered for a single scan.

Root Cause

The duplicate confirmations were caused by a combination of:

Stale React closures where the scanner callback captured outdated state values during initialization.
No processing guard, allowing the scanner to invoke the scan callback multiple times per second for the same QR code.
Asynchronous state updates, preventing the scanner from stopping immediately after a successful scan.

Changes Made

AttendancePage.jsx

Testing
Verified successful attendance marking displays a single confirmation.
Verified duplicate API requests are no longer generated for the same QR scan.
Verified scanner recovery after failed scans.
Verified repeated scans of different participants continue to function normally.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@raj1246 is attempting to deploy a commit to the fedkiitgmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. 😊

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you @raj1246 for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant