SE701-T5 / Frontend

This is the frontend repo of Uni-forum, associated with the University of Auckland, SOFTENG701. This repo will be linked to Netlify for ease of deployment and code review
MIT License
1 stars 22 forks source link

Replace <a href/> inside Login and Register pages to use the useNavigate() hook from react-router-dom #50

Closed christopher-alba closed 2 years ago

christopher-alba commented 2 years ago

Replace <a href/> inside Login, password-reset and Register pages to use the useNavigate() hook from react-router-dom

Why?

Although this method works, it refreshes the page which may degrade the user experience. By using the useNavigate( ) hook it will use the SPA (single page application) routing features.

For example: image On line 74 in the image above the a tag needs to be removed and instead add an onclick on line 75 and inside an anonymous function use navigate("/register") from useNavigate( )'s return value.