refactor: optimize socket connection handling by removing polling transport and implementing lazy connection strategy in SocketManager for improved performance
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user