Skip to content

Commit

Permalink
Use hashrouter as browser router is not well supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Jan 21, 2024
1 parent 16b11a4 commit 7c97b06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import {createBrowserRouter, createRoutesFromElements, Navigate, Route} from "react-router-dom";
import {createHashRouter, createRoutesFromElements, Navigate, Route} from "react-router-dom";
import {RouterProvider} from "react-router";
import {Statistics} from "@/pages/statistics.tsx";
import axios from "axios";

const router = createBrowserRouter(createRoutesFromElements(
const router = createHashRouter(createRoutesFromElements(
<Route path="/" element={<App/>}>
<Route index element={<Navigate to="/statistics"/>}/>
<Route path="/statistics" element={<Statistics/>}/>
Expand Down

0 comments on commit 7c97b06

Please sign in to comment.