The logic for the hackathon check-in scanner was claiming that users were not RSVP'd when they, in fact, were. Furthermore, the code for the scanner was messy and hard to follow with sometimes nested ternary rendering logic.
What
Rewrote the logic for the scanner to use the props passed in from the server component as the single source of truth
Used the useAction hook for taking care of handling success and error state
Further leveraged the toasts for giving loading, success, and error states
Added check to ensure users do not screenshot or use someone else's QR code by implementing both a client and server-side check to ensure no QR code is older than 5 minutes
Refactored the QR scanner code to be much cleaner to read and removed ternary rendering logic.
Rename the admin tab from "check-in" to "hackathon check-in"
Why
The logic for the hackathon check-in scanner was claiming that users were not RSVP'd when they, in fact, were. Furthermore, the code for the scanner was messy and hard to follow with sometimes nested ternary rendering logic.
What
useAction
hook for taking care of handling success and error stateSatisfies
HK-174 (#127 )