Skip to content

Commit

Permalink
Fix GitHub Pages issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hgarciasoftware committed Feb 1, 2022
1 parent 3cf9ac8 commit 6dbe2f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { HashRouter, Routes, Route } from 'react-router-dom';
import About from './components/About';
import Feedback from './components/Feedback';
import Footer from './components/Footer';
Expand All @@ -8,7 +8,7 @@ import PokemonNav from './components/PokemonNav';

function App() {
return (
<BrowserRouter>
<HashRouter>
<div className="container">
<Header />
<main>
Expand All @@ -23,7 +23,7 @@ function App() {
</main>
<Footer />
</div>
</BrowserRouter>
</HashRouter>
);
}

Expand Down

1 comment on commit 6dbe2f7

@hgarciasoftware
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebook/create-react-app#1765 (comment)

HashRouter allows giscus to work successfully as it works by changing the hash as opposed to the pathname. Otherwise, we'd have to serve a special 404.html page.

Please sign in to comment.