chat-ui
5b779a6a - ✨ add thumb up/down voting system for messages (#152)

Commit
2 years ago
✨ add thumb up/down voting system for messages (#152) * add thumb up/down voting system for messages * make like/dislike buttons toggle + bind to server * refactor vote API to better endpoint structure * set score to undefined rather than 0 when toggled * throw if message is not found + refactor retry dispatch * fix undefined class * Only make the buttons invisible if there's no score Co-authored-by: Eliott C. <coyotte508@gmail.com> * only allow thumb up/down if user is the author of the messages * always show thumbs up/down when voted * use MongoDB instead of mutating messages array in code * fix typings * fix linting issue * refactor code to throw before ifs * add auth logic to vote API endpoint * lint fix after merge conflict * on mobile only show thumbs on top + increase spacing between messages * fix thumbs always showing on mobile --------- Co-authored-by: coyotte508 <coyotte508@gmail.com>
Author
Parents
Loading