-
Notifications
You must be signed in to change notification settings - Fork 190
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
chore: add react router to the project #330
Conversation
- refactor: replace the way that we save the "state" what route is active (selected)
@@ -1,5 +1,5 @@ | |||
{ | |||
"homepage": "./", | |||
"homepage": "https://anitab-org.github.io/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's something that needs to be changed in PR, but we won't know until you merge it.
-
If the project doesn't work, the solution to make it work is to change this line of code by adding this value:
https://github.com/anitab-org/anitab-org.github.io/
-
Else, just celebrate 🎉
@ftonato hey thank you for the fix! |
@@ -14,6 +14,7 @@ | |||
"react-native-hyperlink": "0.0.19", | |||
"react-native-reflect": "^0.1.6", | |||
"react-native-web": "^0.12.2", | |||
"react-router-dom": "^5.3.0", | |||
"react-scripts": "^3.4.1" | |||
}, | |||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no expert in react but when I was deploying my personal site to GitHub Pages, the scripts part was deploying through a separate gh-pages
branch on my repo and not the master branch unlike this one.
The problem I see here is that the master branch is currently 140 commits behind develop, and the recent ones are from testing few PRs, does it lead to any problems @ftonato 👀
Also acc to the documentation it's safer to have a the gh-pages branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, by default projects tend to separate a branch called gh-pages, but there are those who do it on the master branch, there is no wrong one, and both work equally, it all depends on how people (owners) define it and their strategies.
For example, an application might have production code in the master
branch, in the develop
branch the code for things they are implementing, and in a docs
branch for documentation using gh-pages.
In summary, there are no errors here, here they defined that the master branch is the one that displays the site, so let's go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Sorry this ended up being so much here, but I think the restructure is probably the right way to go about it. I was contemplating doing that when I was in there, but wasn't sure if it made sense to mess things up too much. I guess I still don't entirely understand why this makes more sense for GH pages than what we were doing before? But I am glad it's working!
GitHub Pages does not support browser history like your browser does. To overcome this issue, we need to use a Hash router instead of a browser router in our app. |
@ftonato ah that makes sense. Hence why it works on local browser but not with gh pages. Thanks for the explanation! |
I'm closing outdated issues and pull-requests that are no longer relevant given how much time has passed since they were opened. |
Description
This pull-request introduces routes into the application, making it possible to share the page we are on with other people easily.
Fixes #294, #329
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Checklist:
Delete irrelevant options.
Code/Quality Assurance Only
/c @isabelcosta, @brittanyjoiner15