hasadna / open-bus-map-search

open-bus-map-search
https://open-bus-map-search.hasadna.org.il/dashboard
MIT License
50 stars 89 forks source link

[bug] fix base url #329

Open NoamGaash opened 8 months ago

NoamGaash commented 8 months ago

seems like we have a problem with the base href: image

https://open-bus-map-search.hasadna.org.il/profile/1

bilalshaikh292 commented 8 months ago

heyy @NoamGaash is the issue still open ? I would like to contributre ?

NoamGaash commented 8 months ago

@bilalshaikh292 sure, go ahead! We're accepting pull requests

Roni750 commented 8 months ago

Hey, I'd love to resolve this Issue 🤩 I assigned myself if that's ok.

NoamGaash commented 8 months ago

@Roni750 sure! good luck :pray:

oribro commented 7 months ago

@NoamGaash Is this still a bug? How to reproduce it?

NoamGaash commented 7 months ago

@oribro STR:

  1. open devtool
  2. go to https://open-bus-map-search.hasadna.org.il/profile/1
  3. see the network tab

We try fetching https://open-bus-map-search.hasadna.org.il/profile/assets/index-815ef71e.js instead of https://open-bus-map-search.hasadna.org.il/assets/index-815ef71e.js

oribro commented 7 months ago

@NoamGaash
Ok, this is some wild guess, but inside index.tsx we have that getRoutesList component:

image

Maybe removing the 'profile' prefix would solve this?

Thanks

NoamGaash commented 7 months ago

@oribro I want a better solution, that will allow us to set the base href from env variable.

  1. go here
  2. refresh the page

do you see the problem?

AssafGolani commented 6 months ago

@NoamGaash would adding a define object with reading the env variable to the vite.config.ts then reading this like this in the routes index.tsx: const BASE_URL = import.meta.env.REACT_APP_BASE_URL || '/'; and changing const router to: const router = createBrowserRouter(routes, { basename: BASE_URL }) be a solution for this issue?

NoamGaash commented 6 months ago

maybe. if it solves the issue, that's great.

itsoriki commented 3 months ago

Is this issue still relevant? Is it really a "good first issue"? What exactly needs to be done?

NoamGaash commented 3 months ago

@itsoriki see this link - https://open-bus-map-search.hasadna.org.il/profile/1 it's broken. https://github.com/hasadna/open-bus-map-search/issues/329#issuecomment-1927254252 google "base href react" or "base href vite" for more information