mitxpro-dev / learnjs

Learn JS
https://mitxpro-dev.github.io/learnjs/
MIT License
1 stars 2 forks source link

Issue-43/Fix/Router #44

Closed codeTrackLift closed 1 year ago

codeTrackLift commented 1 year ago
# Description Issue: #43 - [x] Investigate the issue - Found [this medium article](https://medium.com/geekculture/github-pages-with-dynamic-routes-40f512900efa) that discusses `gh-pages` and a workaround for dynamic routes - The article above gave me the idea to try `HashRouter` instead of `BrowserRouter` in an attempt to fix the `404` issue - [x] Update `App.tsx` to use `HashRouter` instead of `BrowserRouter` and removed the `basename` - Tested this in a copy of this repo and it seemed to work, see videos and notes below. # Videos
Click here for Videos #### Before this change, with `BrowserRouter` https://github.com/mitxpro-dev/learnjs/assets/96446064/b0b26932-cf9e-4254-a9ee-4e57a8a1223e #### After this change, with `HashRouter` https://github.com/mitxpro-dev/learnjs/assets/96446064/5f857f14-ee8b-4143-ab21-02fe186ee002
# Notes Used a personal repo as a test environment, see links below: - [Repo](https://github.com/codeTrackLift/learnjs-test) - [Deployed site](https://codetracklift.github.io/learnjs-test/)