Skip to content

Commit 25282d2

Browse files
committed
clean
1 parent 5b0e5fb commit 25282d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
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>

room.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createClient } from "@liveblocks/client";
33
const 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, {

0 commit comments

Comments
 (0)