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

Refreshing pages does not work #86

Open
K20shores opened this issue Jan 31, 2025 · 2 comments
Open

Refreshing pages does not work #86

K20shores opened this issue Jan 31, 2025 · 2 comments
Assignees

Comments

@K20shores
Copy link
Collaborator

Refreshing on pages that aren't the home page results in a 404

Acceptance Criteria

  • On any route that isn't the home (e.g., /LoggedIn), refreshing the page will load that page

Ideas

  • Figure out how to configure react-router-dom to load the page on a refresh
@LucientZ LucientZ self-assigned this Jan 31, 2025
@LucientZ
Copy link
Collaborator

LucientZ commented Feb 5, 2025

The refreshing appears to work both when running both the development server and preview build locally (eg. npm run dev or npm run build && npm run preview).

It looks like this stackoverflow discussion details why this is the case. Switching over to a <HashRouter> skips the issue altogether, but it turns the actual site into a single page site which I don't think is what we want since other pages should be searchable via web browsers.

@K20shores Are there any details as to how the site is hosted in production?

@K20shores
Copy link
Collaborator Author

@LucientZ, yes. We self host a machine in ACOM. This machine hosts the web files, the API server compiled to run directly on our hardware which is setup as a linux server, and a service running the database. Nginx routes all of our traffic.

If this works in dev, then it's most likely a deployment issue and something that could be fixed by messing with the nginx configuration.

Thanks for investigating this. Once y'all get a few PRs in, we can deploy your changes and revisit this issue then. Sound like a plan?

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

No branches or pull requests

3 participants