docbrown/app/javascript/src
Francisco Delgado 2d4d469e86 Refactor/onboarding (#1083)
* Refactor Onboarding

- use ternary for simple if-else cases (to reduce lines of code)
- remove unecessary trailing else clause
- destructure state variables
- add a consistent return eg null when nothing is rendered
- use prevState callback when new state depends on previous state
- use switch case when toggling onboarding screens, constants easier to read imo.

* Add rest of refactor

* Remove destructure to meet 25 line minumum from codeclimate.

* Remove duplicate calls to indexOf.

* Remove duplicate calls to indexOf in handleSaveArticle.

* Refactor handleCheckUser

* Update snapshot

* Address PR review comments.

* Revert "Update snapshot"

This reverts commit e17e915286fb621ffca745b28193b7ba63dbc498.

* Update snapshot

* Add back if clause

* Update refactor
2018-11-28 10:21:26 -05:00
..
__tests__ Refactor/onboarding (#1083) 2018-11-28 10:21:26 -05:00
components Improve Onboarding's spec & Update snapshots (#1111) [ci skip] 2018-11-14 16:18:02 -05:00
utils Fix hanging /connect notification issue (#1174) 2018-11-21 12:08:09 -05:00
Onboarding.jsx Refactor/onboarding (#1083) 2018-11-28 10:21:26 -05:00