chore: clean up lint warnings

This commit is contained in:
Simon
2025-10-12 00:34:17 +08:00
parent f923e8a6db
commit 8ac868ebe2
6 changed files with 573 additions and 458 deletions

View File

@@ -1,4 +1,3 @@
// import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { Route, Router, Switch } from 'wouter'
import { useHashLocation } from 'wouter/use-hash-location'
@@ -8,23 +7,11 @@ import { default as TestPagesRouter } from './test-pages/router.tsx'
import './index.css'
let baseURL: string
// 如果是 localhost就用 /
// 如果是其他环境,阶段到 index.html
if (window.location.hostname === 'localhost') {
baseURL = '/'
} else {
baseURL = window.location.pathname.split('index.html')[0] + 'index.html'
}
createRoot(document.getElementById('root')!).render(
// <StrictMode>
<Router hook={useHashLocation}>
<Switch>
<Route path="/test-pages" component={TestPagesRouter} nest />
<Route path="/" component={PagesRouter} nest />
</Switch>
</Router>
// </StrictMode>
)