mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2024-11-16 22:29:24 +08:00
Switch to hashrouter for github pages compatibility
This commit is contained in:
parent
db817e3be1
commit
8af4b9b3ac
1 changed files with 87 additions and 80 deletions
13
src/App.tsx
13
src/App.tsx
|
@ -4,7 +4,11 @@ import Error from "./Routes/Error/Error";
|
|||
import Products from "./Routes/Products/Products";
|
||||
import Logs from "./Routes/Logs/Logs";
|
||||
import Container from "./Components/Container/Container";
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
import {
|
||||
createBrowserRouter,
|
||||
createHashRouter,
|
||||
RouterProvider,
|
||||
} from "react-router-dom";
|
||||
import Store from "./Plugins/Redux/Store/Store";
|
||||
import { Provider } from "react-redux";
|
||||
import Inventory from "./Routes/Inventory/Inventory";
|
||||
|
@ -17,7 +21,8 @@ import Register from "./Routes/Register/Register";
|
|||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
const router = createBrowserRouter([
|
||||
const router = createHashRouter(
|
||||
[
|
||||
{
|
||||
path: "/",
|
||||
element: (
|
||||
|
@ -95,7 +100,9 @@ const router = createBrowserRouter([
|
|||
</Container>
|
||||
),
|
||||
},
|
||||
]);
|
||||
],
|
||||
{ basename: "/Ivy" }
|
||||
);
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue