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 150 forks source link

React Swipeable Routes Added #63

Closed ADRE9 closed 3 years ago

ADRE9 commented 3 years ago

Issue Number

fixes #39

Changes Made 1.I removed the Switch component as ReactSwipeable was doing the same thing either way.

  1. I removed out the MainLayout component from every page since it was unnecessary and redundant.
  2. I added the MainLayout over the ReactSwipeable component.
  3. I had to use useEffect to update location as the user swipes so as the location reflects in the Bottom Navigation.

Describe if there is any unusual behavior (Any Warning) of your code(Write NA if there isn't) A Warning pops up in yellow as:-

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

Abhishek-kumar09 commented 3 years ago

Make PR against master, and rebase to latest changes of master since it has linting errors being fixed.

ADRE9 commented 3 years ago

I've made the PR to the main now. Can you please check if everything is right? @Abhishek-kumar09

Abhishek-kumar09 commented 3 years ago

Thanks for your PR. Merging it.