mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-06-07 02:03:32 +00:00
Login Form used to display the message “未登录或登录已过期,请重新登录” twice because the `useEffect` that inspects the `expired` query parameter was re-executed on every re-render (e.g. language change or React StrictMode’s double-mount in development). ### What's changed • **LoginForm.js** – `useEffect` that shows the toast now has an empty dependency array so it runs only once on initial mount. • Reviewed **PasswordResetConfirm.js**, **PasswordResetForm.js** and **RegisterForm.js** and confirmed they do not contain the same issue; no changes were required. ### Impact Users now see the “session expired” notification exactly once, removing confusion and improving the overall UX.