mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-04 04:38:15 +00:00 
			
		
		
		
	feat(chat-window): display toast when retried
This commit is contained in:
		@@ -237,8 +237,11 @@ const useSocket = (
 | 
			
		||||
            const interval = setInterval(() => {
 | 
			
		||||
              if (ws.readyState === 1) {
 | 
			
		||||
                setIsWSReady(true);
 | 
			
		||||
                retryCountRef.current = 0;
 | 
			
		||||
                setError(false);
 | 
			
		||||
                if (retryCountRef.current > 0) {
 | 
			
		||||
                  toast.success('Connection restored.');
 | 
			
		||||
                }
 | 
			
		||||
                retryCountRef.current = 0;
 | 
			
		||||
                clearInterval(interval);
 | 
			
		||||
              }
 | 
			
		||||
            }, 5);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user