mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Improve forceDisconnected state change handling (#16271)
GitOrigin-RevId: 4c09c1ef8123ad84358d0446c1249e4a0ae7c217
This commit is contained in:
parent
d0bbcca839
commit
a4cfb8c01d
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue