File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1818 </ div >
1919
2020 < script type ="module ">
21- import { client } from ' ./room.js' ;
21+ import { client } from " ./room.js" ;
2222
23- const elm_button = document . getElementById ( ' connect' ) ;
23+ const elm_button = document . querySelector ( "# connect" ) ;
2424 const elm_name = document . querySelector ( "#name" ) ;
2525 const elm_room = document . querySelector ( "#room" ) ;
2626
27- elm_button . addEventListener ( ' click' , ( ) => {
27+ elm_button . addEventListener ( " click" , ( ) => {
2828 localStorage . setItem ( "name" , elm_name . value ) ;
2929
3030 const { room, leave } = client . enterRoom ( elm_room . value ) ;
3131
3232 room . subscribe ( "others" , ( others ) => {
33- document . getElementById ( ' status' ) . innerText = `There are ${ others . length } other user(s) online` ;
33+ document . getElementById ( " status" ) . innerText = `There are ${ others . length } other user(s) online` ;
3434 } ) ;
3535 } ) ;
3636 </ script >
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { createClient } from "@liveblocks/client";
33const client = createClient ( {
44 authEndpoint : async ( roomId ) => {
55 const name = localStorage . getItem ( "name" ) ;
6-
6+
77 console . log ( "authEndpoint: " , roomId , name ) ;
88
99 const response = await fetch ( "http://localhost:8080/api/liveblocks-auth?name=" + name , {
You can’t perform that action at this time.
0 commit comments