Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacing the depreciated useHistory() hook with the new useNavigate(…
…) hook This updates the navigation logic to align with React Router v6, replacing the deprecated useHistory() hook with the new useNavigate() hook. React Router v6 introduced useNavigate() to simplify programmatic navigation and remove the legacy useHistory() API. This change ensures the application works seamlessly with React Router v6. Changes include: Replaced useHistory() with useNavigate() in the Tutorials component and relevant functions. Updated navigation calls from history.push() to navigate() for navigating to tutorial pages and selecting tags. Refactored handleContainerClick and selectTag to use navigate() for URL updates and navigation. This change ensures the codebase is compatible with the latest version of React Router, improving readability and future-proofing the app.
- Loading branch information