AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

BUG inviter profile shows a modal `Invitation Already Accepted` after invite accepted by guest #326

Closed chef-louis closed 1 week ago

chef-louis commented 1 week ago

As of June 17, this bug is found on the referralDataLogic branch.

Steps to reproduce:

  1. Log into user with an owned card
  2. Invite a user to be a guest on that card
  3. Claim that invite using the invite_id // See the success modal as expected
  4. Logout of invitee account
  5. Login to inviter account
  6. See the 'already redeemed' modal which is unexpected
chef-louis commented 1 week ago

Image

chef-louis commented 1 week ago

inviteData needed to be reset on user logout. The jotai state was persisting the inviteData which caused a duplicative check against an already redeemed invite_id. Resetting the inviteData fixes this issue.