vZDC-ARTCC / website

Website for the VZDC ARTCC
Apache License 2.0
1 stars 0 forks source link

Confirm login button state does not match checkbox #14

Closed harryxu2626 closed 1 week ago

harryxu2626 commented 1 week ago

Your Vatsim CID

1775879

Description

When logging in, if a user clicks the checkbox to accept the disclaim, then clicks away, then tries to log in again, the login button is still enabled without checking the checkbox again.

If the user attempts to use the checkbox again, it would instead disable the login button

image

image

Minimal Reproduction

  1. Click the Login Button
  2. Accept the disclaimer/click the checkbox
  3. Click away from the disclaimer box or click "I do not accept"
  4. Click the Login Button again
  5. The bug should appear

Additional info

Probably just need to reset some useState variable to false if the user clicks away or clicks "I do not accept"

Validation

harryxu2626 commented 1 week ago

fixed by added setAccepted(false) in the handleAlertClose function