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

[bug] fix base url #329

Open
NoamGaash opened this issue Dec 18, 2023 · 12 comments
Open

[bug] fix base url #329

NoamGaash opened this issue Dec 18, 2023 · 12 comments
Labels
bug Something isn't working frontend frontend developers issue

Comments

@NoamGaash
Copy link
Member

NoamGaash commented Dec 18, 2023

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

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

@NoamGaash NoamGaash added bug Something isn't working good first issue Good for newcomers frontend frontend developers issue labels Dec 18, 2023
@bilalshaikh292
Copy link

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

@NoamGaash
Copy link
Member Author

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

@bilalshaikh292 bilalshaikh292 removed their assignment Dec 21, 2023
@Roni750 Roni750 self-assigned this Dec 24, 2023
@Roni750
Copy link
Collaborator

Roni750 commented Dec 24, 2023

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

@NoamGaash
Copy link
Member Author

@Roni750 sure! good luck 🙏

@oribro
Copy link
Contributor

oribro commented Feb 5, 2024

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

@NoamGaash
Copy link
Member Author

@oribro
Copy link
Contributor

oribro commented Feb 8, 2024

@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
Copy link
Member Author

NoamGaash commented Feb 8, 2024

@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
Copy link

@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
Copy link
Member Author

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

@NoamGaash NoamGaash linked a pull request Mar 27, 2024 that will close this issue
@itsoriki
Copy link
Collaborator

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

@NoamGaash
Copy link
Member Author

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

@NoamGaash NoamGaash removed the good first issue Good for newcomers label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend frontend developers issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants