feat(#25): Add ability to kick a user

This commit is contained in:
Josh Creek
2024-01-05 18:52:34 +00:00
parent 397aa528dc
commit 6ae45d9c6a
4 changed files with 118 additions and 2 deletions
+9 -1
View File
@@ -97,6 +97,14 @@
});
}
function handleKickUser(userId: string) {
console.log('sending kick-user message');
sendMessage(socket, {
type: 'kick-user',
userId
});
}
function restartEstimation() {
sendMessage(socket, { roomId: data.roomId, type: 'restart-estimation' });
}
@@ -167,7 +175,7 @@
<Modal {closeModal} {joinRoom} />
{/if}
<UsersList bind:this={usersList} {users} {showEstimates} {userId} {handleEmojiTrigger} />
<UsersList bind:this={usersList} {users} {showEstimates} {userId} {handleEmojiTrigger} {handleKickUser} />
<div class="button-container">
{#if showRestartButton}