bcantello / peoples_voice_project

A central location where users can search government representatives, discover upcoming local elections, and find polling locations
https://www.peoplesvoiceproject.com
0 stars 1 forks source link

Fix upcoming elections blank page #72

Open MikelTafalla opened 1 year ago

MikelTafalla commented 1 year ago

The issue was different than https://dev.to/rajeshroyal/page-not-found-error-on-netlify-reactjs-react-router-solved-43oa

I found a work around, not sure how good or desirable it is. Other than what I did, I believe that another fix would require to reorganize the app structure or how the useEffects load... I cannot explain why, but it looks like in order to have the universalContext loaded as well as the session, we need to lbe sure the Home page is loaded. So for cases like the issue, I added a redirection that would make the home page load in the background even if we access http://localhost:3000/upcomingElections directly from the browser.