Skip to content

Commit

Permalink
fix-online-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Jan 16, 2025
1 parent 190cb3c commit 16cf7bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useInitializePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export const useInitializePage = () => {
IndexerWebsocketManager.getActiveResources().forEach((r) => r.restart());
logAbacusTsInfo('useInitializePage', 'restarting because network status change');
};
document.addEventListener('online', handleOnline);
window.addEventListener('online', handleOnline);
return () => {
document.removeEventListener('online', handleOnline);
window.removeEventListener('online', handleOnline);
};
}, [localStorageNetwork]);
};

0 comments on commit 16cf7bf

Please sign in to comment.