resilience-app icon indicating copy to clipboard operation
resilience-app copied to clipboard

Fix volunteer profile signup not submitting

Open DrewThomasCorps opened this issue 4 years ago • 2 comments

Fixes #472

To test you can comment out line 45 of RoutePermissions.ts and use the 2223334444 phone number. (This route permissions blocks existing users from signing up again) or just use your own that you haven't used before. If you run npm run start you can see the values change in firebase.

I changed the organizationUid to a string to match the uid type in firebase.

In ConnectSocialMedia, PhoneAuth, and SignupSuccess, the prop types no longer matched what was being used, so I updated them (fixed some warnings in my IDE).

The loading state was not being used in SignupScene so I removed it.

I updated the handleSuccess functions in SignupScene to pass the data to updateUser. This prevents the user from updating before the value state finished updating. After the user is successfully updated, then the state is updated along with the page.

I passed the setActiveState in as a callback to updateUser so it could update it after finishing updating the user.

updateUser() didn't previously update the user. Now it does.

Lastly I moved the logic for getting the address into a separate function to improve readability. (2 sets of try catches seemed extra).

DrewThomasCorps avatar May 20 '20 01:05 DrewThomasCorps

@jwu910 I believe this has been approved, but your change request is blocking it. Would you mind re-reviewing? I'd be happy to make more changes if needed.

DrewThomasCorps avatar May 25 '20 22:05 DrewThomasCorps

Just an update: I'm running into a bug I thought I had fixed where it refreshes the PhoneAuth page rather that calls the callback. There might be a race condition somewhere. I'll work on it more tomorrow and ask for help if I can't figure it out.

DrewThomasCorps avatar May 29 '20 02:05 DrewThomasCorps