Move to hash router and change url accordingly

This commit is contained in:
keannu125 2023-03-25 13:00:36 +08:00
parent e61aef640b
commit 23a394643d
2 changed files with 7 additions and 3 deletions

View file

@ -2,7 +2,7 @@
"name": "react-notes",
"version": "0.1.0",
"private": true,
"homepage": "https://lemeow125.github.io/react-notes",
"homepage": "https://lemeow125.github.io/react-notes/#",
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",

View file

@ -2,7 +2,11 @@ import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import reportWebVitals from "./reportWebVitals";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import {
createBrowserRouter,
createHashRouter,
RouterProvider,
} from "react-router-dom";
import Home from "./Routes/Home/Home";
import NewNote from "./Routes/NewNote/NewNote";
@ -19,7 +23,7 @@ import Store from "./Features/Redux/Store/Store";
const queryClient = new QueryClient();
const router = createBrowserRouter([
const router = createHashRouter([
{
path: "/",
element: <Home />,