mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[web] close connection permanently when opening out-of-sync modal (#23148)
* [web] close connection permanently when opening out-of-sync modal * [web] disable generic forceDisconnected behavior for out-of-sync modal * [web] hide "disconnected" banner when displaying out of sync modal GitOrigin-RevId: 133b3e24d94279917298ce7fd5d0a76da2265512
This commit is contained in:
+6
-2
@@ -15,10 +15,14 @@ function ForceDisconnected() {
|
||||
const [show, setShow] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
if (connectionState.forceDisconnected) {
|
||||
if (
|
||||
connectionState.forceDisconnected &&
|
||||
// out of sync has its own modal
|
||||
connectionState.error !== 'out-of-sync'
|
||||
) {
|
||||
setShow(true)
|
||||
}
|
||||
}, [connectionState.forceDisconnected])
|
||||
}, [connectionState.forceDisconnected, connectionState.error])
|
||||
|
||||
useEffect(() => {
|
||||
if (connectionState.forceDisconnected) {
|
||||
|
||||
Reference in New Issue
Block a user