mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-15 20:38:56 +08:00
refactor(layout): 优化网页布局和路由设置
- 更新 logo显示方式,使用 import 代替直接引用 - 将 BrowserRouter 替换为 HashRouter,以适应前端路由 - 在项目中添加 logo.svg 文件,统一 logo 资源 - 调整 vite.config.ts,设置 base 为 './' 以优化构建
This commit is contained in:
@@ -2,7 +2,7 @@ import './App.css'
|
||||
import { HomePage } from './pages/HomePage/Home.tsx'
|
||||
import { useTaskPolling } from '@/hooks/useTaskPolling.ts'
|
||||
import SettingPage from './pages/SettingPage/index.tsx'
|
||||
import { BrowserRouter, Navigate, Routes } from 'react-router-dom'
|
||||
import { BrowserRouter,HashRouter, Navigate, Routes } from 'react-router-dom'
|
||||
import { Route } from 'react-router-dom'
|
||||
import Index from '@/pages/Index.tsx'
|
||||
import NotFoundPage from '@/pages/NotFoundPage' //
|
||||
@@ -26,7 +26,7 @@ function App() {
|
||||
]
|
||||
return (
|
||||
<>
|
||||
<BrowserRouter>
|
||||
<HashRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<Index />}>
|
||||
<Route index element={<HomePage />} />
|
||||
@@ -49,7 +49,7 @@ function App() {
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</HashRouter>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user