cms
cms copied to clipboard
added scroll restoration on forward/backward navigation
PR Fixes:
- 1 Added Scroll restoration to contents
The course content page scrolls to the top on navigation(backward/forward). Scrolling through the same weeks of content again and again to find the video/week is just straight up annoying. This PR fixes it, restores back to the point before navigation.
Checklist before requesting a review
- [x ] I have performed a self-review of my code
- [x ] I assure there is no similar/duplicate pull request regarding same issue
@KitsuneKode
- isn't ref logic redundant?
- also is there any use of { scroll: false } as we're using window.scrollTo logic in useEffect anyway? it seemed to work fine w/o them too..