Skip to content

Commit

Permalink
Fix for routing on GitHub pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinsays committed Mar 12, 2020
1 parent 2d378c8 commit 36b59ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import PublicRoute from './Public';
import PrivateRoute from './Private';
import SplitRoute from './Split';

// This is config for GitHub Pages.
// If you are deploying to a top level domain,
// you can remove the basename prop from the Router.
const base = process.env.PUBLIC_URL || '/';

const Routes = () => (
<Router>
<Router basename={base}>
<Switch>
{routes.map(route => {
if (route.auth && route.fallback) {
Expand Down

0 comments on commit 36b59ec

Please sign in to comment.