11import { useEffect , useState } from 'react' ;
22import { useLocation } from 'react-router' ;
3- import { useAtomValue } from 'jotai' ;
4- import { setIsAppDataSyncing , setLastAppDataSync } from '@services/states/app' ;
3+ import { useAtomValue , useSetAtom } from 'jotai' ;
4+ import { setLastAppDataSync } from '@services/states/app' ;
55import { isTest , LANGUAGE_LIST } from '@constants/index' ;
6- import { congAccountConnectedState , isOnlineState } from '@states/app' ;
6+ import {
7+ congAccountConnectedState ,
8+ isAppDataSyncingState ,
9+ isOnlineState ,
10+ } from '@states/app' ;
711import {
812 backupAutoState ,
913 backupIntervalState ,
@@ -27,6 +31,8 @@ const useWebWorker = () => {
2731
2832 const { isMeetingEditor } = useCurrentUser ( ) ;
2933
34+ const setIsAppDataSyncing = useSetAtom ( isAppDataSyncingState ) ;
35+
3036 const isOnline = useAtomValue ( isOnlineState ) ;
3137 const isConnected = useAtomValue ( congAccountConnectedState ) ;
3238 const backupAuto = useAtomValue ( backupAutoState ) ;
@@ -79,7 +85,7 @@ const useWebWorker = () => {
7985 }
8086 } ;
8187 }
82- } , [ isMeetingEditor , sourceLang ] ) ;
88+ } , [ isMeetingEditor , sourceLang , setIsAppDataSyncing ] ) ;
8389
8490 useEffect ( ( ) => {
8591 const runBackupTimer = setInterval ( async ( ) => {
0 commit comments