fix(auth): defer setState in OAuth error effect to avoid cascading renders

This commit is contained in:
Kirill
2026-05-22 14:50:38 +05:00
parent b1530ef705
commit 03e60e46f3
+4 -1
View File
@@ -32,9 +32,12 @@ export function AuthPage() {
useEffect(() => {
const err = searchParams.get('oauthError')
if (!err) return
const timeoutId = setTimeout(() => {
setOauthError(err)
setSearchParams({}, { replace: true })
}, [searchParams, setSearchParams])
}, 0)
return () => clearTimeout(timeoutId)
}, [])
if (showForgot) {
return (