bloom-frontend
bloom-frontend copied to clipboard
Use new GET /subscription_user endpoint to populate subscription state
Overview
We want to start breaking up the GET /user/me request and only fetch information on the pages it is needed. This is starting with subscriptions. We are getting subscription information on every page when we actually only need it on the /subscription/whatsapp page. Please note this is potentially a large refactor.
Note this ticket is blocked by this issue on the backend.
Action Items
- [ ] Take a look at the app/userSlice.ts
- [ ] Stop populating subscription data on the userSlice from the /user/me request. Instead, populate subscriptions state only on the /subscription/whatsapp page using the new endpoint GET /subscription_user.
- [ ] Ensure you can successfully subscribe and unsubscribe
- [ ] Ensure Cypress tests pass