Change to hash routing, webuiInitialize controls project prefix

This commit is contained in:
choizhang
2025-03-14 17:00:36 +08:00
parent 7bf2d51bd0
commit 10c23aabfd
11 changed files with 14 additions and 1147 deletions

View File

@@ -1,4 +1,4 @@
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import { HashRouter as Router, Routes, Route } from 'react-router-dom'
// import { useAuthStore } from '@/stores/state'
import { Toaster } from 'sonner'
import App from './App'
@@ -22,7 +22,7 @@ const ProtectedRoute = ({ children }: ProtectedRouteProps) => {
const AppRouter = () => {
return (
<ThemeProvider>
<BrowserRouter>
<Router>
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route
@@ -35,7 +35,7 @@ const AppRouter = () => {
/>
</Routes>
<Toaster position="top-center" />
</BrowserRouter>
</Router>
</ThemeProvider>
)
}