Closed shirshak55 closed 3 years ago
Thanks for the contribution! To be honest though, sorry, but I'd rather keep the existing behaviour, instead of stubbing in dev-only data here, so I'm going to close this.
Adding extra edge case logic like this adds extra complexity and things to maintain, risks creating subtle bugs, and it means that developers are testing this stub code, not the real user account code (so it's more likely we'll add bugs without realising).
It shouldn't be necessary anyway: everybody who's contributing to the codebase or anybody who really can't afford the product and needs a free account is welcome to have a free account anyway. The message in isPaidUser
is supposed to encourage that, so nobody needs to hack around and set that to true
!
For development, it's much better if we all use normal accounts with the normal login flow, not a special developer process. It's good to keep development usage as close to deployed usage as possible for accurate testing :smile:. If there's anything that makes that difficult though then of course let me know, I'm definitely interested in smoothing out any issues there.
Without this fix settings page gives:
After this:![Screenshot from 2021-07-24 12-32-49](https://user-images.githubusercontent.com/8097377/126860155-110ec634-b1bf-4fb7-86e9-fc9c5a476cb7.png)
Cause:
If we make
isPaidUser
to true inaccountStore
to true (Although it's not recommend and I do have gifted pro subs by author of this repo).If you see in console we get error it is due to fact the code in settings-page.tsx assumes subs is not undefined.