import { Paper, TextField, Stack, Popper, Avatar, Typography, Card, InputAdornment } from "@mui/material"; import SearchIcon from "@mui/icons-material/Search"; import React from "react"; export default class Content extends React.Component { constructor(props) { super(props); this.state = { searchtext:'', result:[], anchorEl:null }; } handleSearch = (searchtext) => { if(searchtext.trim().length > 2){ this.props.socket.emit('search',searchtext,(err,res)=>{ if(!err){ this.setState({ result:res }); console.log(res); } else{ console.log('Err',err); this.setState({ result:[] }); } }); } else{ this.setState({ result:[] }); } } render() { return (