Skip to content

Commit

Permalink
Use HashRouter since GH pages do not support BrowserRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
grubersjoe committed Jan 17, 2024
1 parent c5de1b5 commit e838636
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { createHashRouter, RouterProvider } from 'react-router-dom';

import Docs from './components/Docs.tsx';

Expand All @@ -12,9 +12,9 @@ if (!container) {

const root = createRoot(container);

const router = createBrowserRouter([
const router = createHashRouter([
{
path: '/',
path: '/*',
element: <Docs />,
},
]);
Expand Down

0 comments on commit e838636

Please sign in to comment.