fix: clarify online player count label
This commit is contained in:
@@ -15,7 +15,7 @@ export function createPresence(counter: HTMLElement) {
|
|||||||
sessionId = auth.gameSessionId;
|
sessionId = auth.gameSessionId;
|
||||||
socket = io('/presence', { auth: { gameSessionId: auth.gameSessionId, token: auth.token }, forceNew: true, autoConnect: false });
|
socket = io('/presence', { auth: { gameSessionId: auth.gameSessionId, token: auth.token }, forceNew: true, autoConnect: false });
|
||||||
socket.on('presence:count', (count: unknown) => {
|
socket.on('presence:count', (count: unknown) => {
|
||||||
if (Number.isSafeInteger(count) && (count as number) >= 0) counter.textContent = `접속 ${count}명`;
|
if (Number.isSafeInteger(count) && (count as number) >= 0) counter.textContent = `현재 ${count}명 접속 중`;
|
||||||
});
|
});
|
||||||
socket.on('connect', () => clearTimeout(retry));
|
socket.on('connect', () => clearTimeout(retry));
|
||||||
socket.on('disconnect', unknown);
|
socket.on('disconnect', unknown);
|
||||||
|
|||||||
Reference in New Issue
Block a user