mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 22:31:09 +03:00
Handle all server status changes
This commit is contained in:
parent
d2f65380a1
commit
c5f02a091b
1 changed files with 8 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue