Hackuarium / bioreactor-ui

https://hackuarium.github.io/bioreactor-ui/.
0 stars 1 forks source link

Problem of relative URL #23

Closed lpatiny closed 3 years ago

lpatiny commented 3 years ago

When you go on the page:

https://hackuarium.github.io/bioreactor-ui/

And click on any options /bioreactor-ui/ disappear from the URL so the website is not working if you simply copy / paste the URL.

I added a new DNS entry and configured the repo to answer to the dns: ui.hackuarium.org

Please could you adapt the build so that it works with this URL ?

https://ui.hackuarium.org

This will required to revert the following change so that the CNAME file is present: https://github.com/Hackuarium/bioreactor-ui/commit/c088b57b7d6ef3641d5ab006c227cda4334ac588

NadjibSb commented 3 years ago

The issue is that GitHub Pages doesn't support single page apps, so there is a 404 error when refreshing the page or copy+past the url. There is two solutions for this issue :

  1. Using HashRouter instead of BrouserRouter
  2. Following those steps by : 2.1. Setting the basename param for BrowserRouter <BrowserRouter basename={process.env.PUBLIC_URL}> so that they work both in development and after deployment 2.2. Add a custom 404.html and redirecting script in index.html (follow github.com/rafgraph/spa-github-pages)

Similar issues :