import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import '@stash/ui/style.css' import './index.css' import AppNext from './AppNext.tsx' import { AdminNext } from './components/admin/AdminNext' /** * 入口分流: * - `/admin`:设置页独立壳; * - `/login`:老地址,直接回首页(登录已改为页内弹窗); * - 其它:正常站点。 * * 判定放在这里而不是 App 里,是因为 App 的 `useViewRoute` 会把地址规范化, * 组件内部再读 pathname 已经晚了。 */ const path = window.location.pathname if (path === '/login') { window.location.replace('/') } const root = createRoot(document.getElementById('root')!) root.render( {path === '/admin' ? : }, )