fix
This commit is contained in:
parent
412d6377bd
commit
c42fc56644
@ -42,11 +42,9 @@ export const UserPage = () => {
|
|||||||
|
|
||||||
const socket = getSocket();
|
const socket = getSocket();
|
||||||
localStorage.setItem('name', value)
|
localStorage.setItem('name', value)
|
||||||
socket.emit('add', { socketId, name: value, lessonid: lessonId });
|
socket.emit('add', { socketId: localStorage.getItem('socketId') || socketId, name: value, lessonid: lessonId });
|
||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
console.log(getSocket())
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainWrapper>
|
<MainWrapper>
|
||||||
<StartWrapper>
|
<StartWrapper>
|
||||||
@ -69,11 +67,6 @@ export const UserPage = () => {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</InputWrapper>
|
</InputWrapper>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<pre>
|
|
||||||
{JSON.stringify(getSocket()?.connected, null, 4)}
|
|
||||||
{JSON.stringify(getSocket()?.id, null, 4)}
|
|
||||||
</pre>
|
|
||||||
</StartWrapper>
|
</StartWrapper>
|
||||||
</MainWrapper>
|
</MainWrapper>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user