mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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(() => {
|
useEffect(() => {
|
||||||
if (connectionState.forceDisconnected) {
|
if (connectionState.forceDisconnected) {
|
||||||
setShow(true)
|
setShow(true)
|
||||||
|
}
|
||||||
|
}, [connectionState.forceDisconnected])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (connectionState.forceDisconnected) {
|
||||||
setSecondsUntilRefresh(connectionState.forcedDisconnectDelay)
|
setSecondsUntilRefresh(connectionState.forcedDisconnectDelay)
|
||||||
}
|
}
|
||||||
}, [connectionState])
|
}, [connectionState.forceDisconnected, connectionState.forcedDisconnectDelay])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (show) {
|
if (show) {
|
||||||
|
|
Loading…
Reference in a new issue