codeforcauseorg / edu-client

Product focuses on 100% education as well as upskilling developing countries and rural areas.
https://educlient.codeforcause.org/
MIT License
130 stars 149 forks source link

ScrollToTop on visiting every new tab in the bottom tab #137

Closed ADRE9 closed 3 years ago

ADRE9 commented 3 years ago

Describe the bug

When the page is scrolled down and swept left or right to another page , the new page is at the same scroll position at the previous page.

To Reproduce

Steps to reproduce the behavior:

1.Make a complete reusable ScrollToTop component. 2.Add the ScrollToTop component at every tab (i.e Home , Courses, profile, etc. )

Expected behavior

On swiping to the next the page will open from the top as scroll to top will be implemented for every Bottom Tab.

ADRE9 commented 3 years ago

@Abhishek-kumar09 @KeenWarrior Can I work on it?

ADRE9 commented 3 years ago

@Abhishek-kumar09 I have stored the ScrollToTop component in the utils section since it can be used for other pages also. We just need to add the component to the page we want. I have added it for the four tabs right now. Anymore changes required?