neilhpatel / CodeATale

This is the repository for my Junior Design project. My team developed an interactive web application for children to read the story Dr. Dolittle while improving comprehension skills through quizzes and audio.
0 stars 0 forks source link

Move bookmark storage to firebase #131

Closed jjohnson660 closed 2 years ago

jjohnson660 commented 2 years ago

These changes move bookmark information from being stored locally to being stored by user in firebase. Only bug I've found so far is when the user spam clicks the "add bookmark button", sometimes the code tries to add the bookmark before the database gets updated, so the bookmark gets added twice which causes weird behavior. Not sure how to fix other than possibly adding a timeout after the add bookmark button is clicked?

UPDATE: Added code to make sure bookmarks aren't added to database, but a second button still gets added in the modal. Once the modal refreshes, the duplicate button goes away. Also, I'm not sure how to fix the codacy error about complexity.