Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Router basename fix #607

Merged
merged 2 commits into from
May 13, 2020
Merged

Conversation

adamkendis
Copy link
Member

Fixes #514

Would like to get @sellnat77 's confirmation that this won't break front-end deployment before merging.

On the live site, clicking any navlink adds an additional /311-data after the hash. This basename was added in #469 in an attempt to resolve 404 errors when navigating directly to any path other than the root URL. The problem wasn't with React Router but an issue with Github Pages only serving the bundle/index at the root URL.

BrowserRouter was swapped out for HashRouter in #490. This added a hash after the root URL but resolved 404 errors and allows navigating directly to any of our front-end routes.

  • Removed basename/devcheck from App.jsx and Router.
  • Removed reference to BASE_URL in orchestration/deployment files.

Note:

  • There are still BASE_URL vars in sagas but these all point to the DB_URL.

    • Up to date with dev branch
    • Branch name follows guidelines
    • All PR Status checks are successful
    • Peer reviewed and approved

Any questions? See the getting started guide

@adamkendis adamkendis added this to the 311-Data - Beta milestone May 13, 2020
@sellnat77
Copy link
Member

Changes all look fine, I don't see why it would bring down the live site...at least nothing is apparent to me
I'm cool with debugging in production haha

@jmensch1 jmensch1 merged commit fd0277a into hackforla:dev May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix React-router for live site
3 participants