This commit is contained in:
yj 2024-07-15 17:36:51 +08:00
parent 5d79891e7d
commit 403a90f016
2 changed files with 13 additions and 13 deletions

View File

@ -166,7 +166,6 @@ const Meeting: React.FC = () => {
getRoomUser() getRoomUser()
break; break;
} }
}) })
}, []) }, [])

View File

@ -17,6 +17,7 @@ export const startSignalr = () => {
} }
export const onSignalr = (callBack: Function) => { export const onSignalr = (callBack: Function) => {
if (connection){
connection.on("ReceiveMessage", (uid: string, userName: string, message: string) => { connection.on("ReceiveMessage", (uid: string, userName: string, message: string) => {
callBack({ callBack({
key:'ReceiveMessage', key:'ReceiveMessage',
@ -28,7 +29,7 @@ export const onSignalr = (callBack: Function) => {
key: 'ReceiveMessage' key: 'ReceiveMessage'
}) })
}); });
}
} }
export const onInvoke = async (str: string, data: any) => { export const onInvoke = async (str: string, data: any) => {
switch (str) { switch (str) {