Skip to content

Commit 404d2a1

Browse files
committed
Update to HashRouter for better support of GitHub pages
1 parent 1bc41c8 commit 404d2a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import Navbar from './pages/Navbar.tsx';
66
import NotFoundPage from './pages/404.tsx';
77
import './styles/main.css';
88
import './App.css';
9-
import { BrowserRouter, Routes, Route } from "react-router-dom";
9+
import { HashRouter, Routes, Route } from "react-router-dom";
1010

1111
function App() {
1212

1313
return (
14-
<BrowserRouter>
14+
<HashRouter>
1515
<Routes>
1616
<Route path="/" element={<Navbar />}>
1717
<Route index element={<SortingVisualiser />} />
@@ -22,7 +22,7 @@ function App() {
2222
<Route path="*" element={<NotFoundPage />} />
2323
</Route>
2424
</Routes>
25-
</BrowserRouter>
25+
</HashRouter>
2626
)
2727
}
2828

0 commit comments

Comments
 (0)