forked from emre/www_projectmycelium_com
fix: switch from BrowserRouter to HashRouter for static hosting compatibility
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
||||
import { HashRouter, Routes, Route } from 'react-router-dom';
|
||||
import { Layout } from './components/Layout';
|
||||
import { lazy, Suspense } from 'react';
|
||||
|
||||
@@ -13,7 +13,7 @@ const GpuPage = lazy(() => import('./pages/gpu/GpuPage'));
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<HashRouter>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Routes>
|
||||
<Route path="/" element={<Layout />}>
|
||||
@@ -28,7 +28,7 @@ function App() {
|
||||
</Route>
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
</HashRouter>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user