Improve forceDisconnected state change handling (#16271)

GitOrigin-RevId: 4c09c1ef8123ad84358d0446c1249e4a0ae7c217
This commit is contained in:
Alf Eaton 2023-12-15 12:21:34 +00:00 committed by Copybot
parent d0bbcca839
commit a4cfb8c01d

View file

@ -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) {