refactor: optimize socket connection handling by removing polling transport and implementing lazy connection strategy in SocketManager for improved performance

This commit is contained in:
sebseb7
2025-07-23 07:29:15 +02:00
parent d8f438c3f3
commit bbd1371eb2
44 changed files with 206 additions and 407 deletions

View File

@@ -61,7 +61,7 @@ const CategoryBox = ({
}
// If socket is available and connected, fetch the image
if (context && context.socket && context.socket.connected && id && !isLoading) {
if (context && context.socket /*&& context.socket.connected*/ && id && !isLoading) {
setIsLoading(true);
context.socket.emit('getCategoryPic', { categoryId: id }, (response) => {