Closed lauslim12 closed 4 years ago
Hey dude! Sorry I haven't had time to merge your last pr, I have to go out of town today so I'll take a look when I have a stable internet connection.
Sure thing man! Take your time and don't worry about it haha!
Hello!
This PR fixes the bug as explained in issue #17, the changes are simple:
reset()
function in thesrc/components/app.jsx
file. Previously, it was made to reset thecurrentDetails
value tobeginners-wish
in the React state variable (I believe this is the cause of the problem). I fixed the problem by removing thecurrentDetails
and adding theselectedWish
state variable whose value is the current banner that the user is browsing on when he/she clicked the reset button.else
statement in thesrc/components/banners.jsx
to not set theselectedBanner
state variable tobeginners-wish
. That way, when we clicked the reset button, we will still remain in our currently selected banner, not scrolling back to the Beginner's Wish.I have tested it in my web server (this includes last PR (#16) changes), and it works like a charm! No more switching to the beginner's wish if we rolled after clicking the reset button!
Don't forget to re-run
npm run build
after merging my previous and this PR, because I made this PR based on yourmaster
branch, not mycache-busting-improvements
branch 😅.I think that's all. Hope it helps and thank you!
Resolves #17