codeforboston / mattapan-mapping

Mattapan Mapping application. A collaborative between powerfulpathways.org & codeforboston.org . Ideation phase.
https://mattapan-pp.netlify.app/
MIT License
5 stars 16 forks source link

Code Design: Use Link component anchor tags #82

Open laudickson opened 2 years ago

laudickson commented 2 years ago

It seems... that the page is reloading whenever a link in the header tag is clicked?? SO says to use Link component as provided from react-router and this will not cause page-refresh

https://stackoverflow.com/questions/33964566/react-router-is-refreshing-page-when-i-follow-a-route-using-a-tag

Anchor tags right now are mainly in the header and the LandingCards on LandingPage

It appears Link component has been created but it is a styled a tag in HeaderAtoms. Change this to use Link component from react-router (and see if react doesn't do full-page refresh)

shalarewicz commented 2 years ago

Dickson - thanks for the Stack Overflow link. Importing the link component from the react-router worked as expected. The page no longer refreshes when using links to navigate.