[Steem Curator] - User Preference Settings

Words
269
Reading
2 min
Listen
Play
8y

Repository:

https://github.com/mightypanda-x/steem-curator

Production URL:

https://steemcurator.com/

Introduction Posts

https://busy.org/@mightypanda/steem-curator-mvp-comments-curation
https://busy.org/@mightypanda/steem-curator-easies-curation-and-tech-debt
https://busy.org/@mightypanda/steem-curator-sorting-feature-and-utopian-posts

New Feature and associated pull request

My main objective with steem curator is to ease the process of finding and curating great posts. One thing that constantly bothered me while curating posts was that I kept forgetting which posts I have already voted on. This new feature addresses this specific use case. Now you can add your username in the settings page and your preferred steem front end. Once this information is set, it will get stored in local storage and retrieved on every site visit. This information is then used to show posts that have already been voted on and can be opened in your preferred frontend. This improves the process of curation by a great extent.

Pull Request: https://github.com/mightypanda-x/steem-curator/pull/7

A walk through the code

saveProfileSettings effect intercepts an action to save settings and saves these settings to local storage. This code then proceeds to the reducer to update the state with the information just saved in the memory.

loadProfileSettings effect intercepts an action to load settings from memory and update the state object.
image.png

This is the actual logic to save and load data from local storage.
image.png

This method creates the object to be saved and dispatches the save action with the object payload.
image.png

ngOnInit method dispatches a load call as soon as the application is loaded to get data from storage and load it in redux store
image.png

Selector to get utopian posts
image.png

This is the piece of code where all the magic happens. It takes in all the available data and adds information of voting and author
image.png
2018-09-11_18-39-56.gif
Github: https://github.com/mightypanda-x

[Steem Curator] - User Preference Settings | Ecency