mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Improve forceDisconnected state change handling (#16271)
GitOrigin-RevId: 4c09c1ef8123ad84358d0446c1249e4a0ae7c217
This commit is contained in:
@@ -14,9 +14,14 @@ function ForceDisconnected() {
|
||||
useEffect(() => {
|
||||
if (connectionState.forceDisconnected) {
|
||||
setShow(true)
|
||||
}
|
||||
}, [connectionState.forceDisconnected])
|
||||
|
||||
useEffect(() => {
|
||||
if (connectionState.forceDisconnected) {
|
||||
setSecondsUntilRefresh(connectionState.forcedDisconnectDelay)
|
||||
}
|
||||
}, [connectionState])
|
||||
}, [connectionState.forceDisconnected, connectionState.forcedDisconnectDelay])
|
||||
|
||||
useEffect(() => {
|
||||
if (show) {
|
||||
|
||||
Reference in New Issue
Block a user