politics-rewired / Spoke

Politics Rewired's fork of Spoke
GNU General Public License v3.0
34 stars 16 forks source link

fix(users): set preferred notification frequency on signup #1630

Closed henryk1229 closed 10 months ago

henryk1229 commented 1 year ago

Description

This pr fixes a bug where the desired notification frequency that a user indicated during signup wasn't being set in the database, resulting in users getting the default value ALL on signup.

It refactors the notification frequency field in the signup form to use the SpokeFormField Select component, ensuring that the value the user enters is included in the formData sent to the backend.

It also sets the notification_frequency value inserted into the user table to the value in the reqBody.

Motivation and Context

It closes #1612

How Has This Been Tested?

Locally.

Screenshots (if appropriate):

Screenshot 2023-06-29 at 10 58 38 AM Screenshot 2023-06-29 at 11 01 13 AM Screenshot 2023-06-29 at 10 59 06 AM

Documentation Changes

Checklist: