import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import App from './App' import { AuthProvider, LoginScreen, MustChangePasswordScreen, useAuth } from './auth' import './styles.css' const root = document.getElementById('root') if (!root) { throw new Error('missing #root element') } function Gate() { const { identity, ready } = useAuth() if (!ready) { return (

正在检查登录状态…

) } if (!identity) return if (identity.must_change_password) return return } createRoot(root).render( )