aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-15 14:22:31 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-15 14:22:31 -0800
commitcc74caf9d9b66711f4aab793966c1f8a5663e1b9 (patch)
tree8602af15cd7e36f1ce1f8a5c9f6753b7f108adbe /frontend/src/App.tsx
parent9f64d3a18eb92c4845dac38265acecef2931490b (diff)
downloadneko-cc74caf9d9b66711f4aab793966c1f8a5663e1b9.tar.gz
neko-cc74caf9d9b66711f4aab793966c1f8a5663e1b9.tar.bz2
neko-cc74caf9d9b66711f4aab793966c1f8a5663e1b9.zip
Switch to HashRouter to fix page reload issues (NK-hy162w)
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 478444c..cc45949 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
-import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom';
+import { HashRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom';
import Login from './components/Login';
import './App.css';
import { apiFetch } from './utils';
@@ -113,10 +113,10 @@ function App() {
localStorage.setItem('neko-font-theme', newFontTheme);
};
- const basename = window.location.pathname.startsWith('/v2') ? '/v2' : '/';
+
return (
- <BrowserRouter basename={basename}>
+ <HashRouter>
<Routes>
<Route path="/login" element={<Login />} />
<Route
@@ -133,7 +133,7 @@ function App() {
}
/>
</Routes>
- </BrowserRouter>
+ </HashRouter>
);
}