Skip to content

Commit

Permalink
adding basename for react router config
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikWatts committed Oct 17, 2024
1 parent 32971d7 commit ca67447
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
7 changes: 7 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; URL='./index.html'" />
</head>
<body></body>
</html>
25 changes: 15 additions & 10 deletions src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ import "./index.css";
import ErrorPage from "./error-page.jsx";
import { QuickSolve } from "./pages/quick-solve/QuickSolve.jsx";

const router = createBrowserRouter([
const router = createBrowserRouter(
[
{
path: "/",
element: <App />,
errorElement: <ErrorPage />,
},
{
path: "/quick-solve",
element: <QuickSolve />,
},
],
{
path: "/",
element: <App />,
errorElement: <ErrorPage />,
},
{
path: "/quick-solve",
element: <QuickSolve />,
},
]);
basename: "/chess-arena",
}
);

ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
Expand Down

0 comments on commit ca67447

Please sign in to comment.