Merge pull request #15592 from overleaf/td-ide-page-more-modals

React IDE page: add out-of-sync modal and project deleted modal

GitOrigin-RevId: 6081a40c3009e8ebc5b3f9752c4059af3d52966d
This commit is contained in:
Tim Down
2023-11-07 09:04:44 +00:00
committed by Copybot
parent ecf7befe88
commit c3afce73c1
13 changed files with 257 additions and 25 deletions
@@ -24,6 +24,7 @@ const initialState: ConnectionState = {
inactiveDisconnect: false,
lastConnectionAttempt: 0,
reconnectAt: null,
forcedDisconnectDelay: 0,
error: '',
}
@@ -181,9 +182,10 @@ export class ConnectionManager extends Emitter<Events> {
this.changeState({
...this.state,
forceDisconnected: true,
forcedDisconnectDelay: delay,
error,
})
setTimeout(() => this.disconnect(), delay * 1000)
setTimeout(() => this.disconnect(), 1000)
}
private onJoinProjectResponse({
@@ -13,6 +13,7 @@ export type ConnectionState = {
forceDisconnected: boolean
inactiveDisconnect: boolean
reconnectAt: number | null
forcedDisconnectDelay: number
lastConnectionAttempt: number
error: '' | ConnectionError
}