|
|
|
@ -35,15 +35,15 @@ const RightInfo = () => {
|
|
|
|
|
const [searchList, setSearchList] = useState<any[]>([])
|
|
|
|
|
const [msgnum, setmsgnum] = useState<any>("");
|
|
|
|
|
//const [isHidden, setIsHidden] = useState(true); // 初始化状态变量为 false
|
|
|
|
|
const ws = useRef<Socket>(new Socket(new SocketOption()))
|
|
|
|
|
const [socketData, setsocketData] = useState<any>({})
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// startSocket()
|
|
|
|
|
// const ws = useRef<Socket>(new Socket(new SocketOption()))
|
|
|
|
|
// const [socketData, setsocketData] = useState<any>({})
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
// startSocket()
|
|
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
|
ws.current.dispose()
|
|
|
|
|
}
|
|
|
|
|
}, []);
|
|
|
|
|
// return () => {
|
|
|
|
|
// ws.current.dispose()
|
|
|
|
|
// }
|
|
|
|
|
// }, []);
|
|
|
|
|
|
|
|
|
|
// const startSocket = () => {
|
|
|
|
|
// let option = new SocketOption()
|
|
|
|
|