Handle all server status changes
This commit is contained in:
@@ -347,14 +347,16 @@ export const ClientConfigStore: FC = () => {
|
||||
useEffect(() => {
|
||||
if (hasLoadedStatus && hasLoadedConfig) {
|
||||
sendEvent(AppStateEvent.Loaded);
|
||||
}
|
||||
}, [hasLoadedStatus, hasLoadedConfig]);
|
||||
|
||||
useEffect(() => {
|
||||
if (serverStatus.online) {
|
||||
sendEvent(AppStateEvent.Online);
|
||||
} else {
|
||||
sendEvent(AppStateEvent.Offline);
|
||||
}
|
||||
}
|
||||
}, [hasLoadedStatus, hasLoadedConfig]);
|
||||
}, [serverStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!clientConfig.chatDisabled && accessToken && hasLoadedConfig) {
|
||||
|
||||
Reference in New Issue
Block a user