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

There are some relative urls with a harcoded contextPath #37

Open
davorpa opened this issue Sep 16, 2022 · 0 comments · May be fixed by #38
Open

There are some relative urls with a harcoded contextPath #37

davorpa opened this issue Sep 16, 2022 · 0 comments · May be fixed by #38

Comments

@davorpa
Copy link
Member

davorpa commented Sep 16, 2022

There are some hardcoded values in the app that doesn't allow deploy it in other contextPath different of /free-programming-books-search

if (folder && file) {
return <a id={id} href={`/free-programming-books-search/?&sect=${folder}&file=${file}`}>{children}</a>;
} else if (file) {
return <a id={id} href={`/free-programming-books-search/?file=${file}`}>{children}</a>;
} else { // Go to the homepage when there's a bad relative URL
return <a id={id} href={`/free-programming-books-search/`}>{children}</a>
}

Use environment instead of:

https://medium.com/@hernan.massad/running-create-react-app-from-non-root-context-path-95be40e3acf0

@davorpa davorpa linked a pull request Sep 16, 2022 that will close this issue
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 a pull request may close this issue.

1 participant