const startLeaveTimer = (users: any): void=>{
const callUsersCount = users.length;
const timeLeaveSeconds = timeLeave.leaveRoom * 5000
let leaveTimer = setTimeout(() => {
if (callUsersCount < 2) {
alert('hey')
}
}, timeLeaveSeconds)
}
let leaveTimer;
const startLeaveTimer = (users: any): void=>{
const callUsersCount = users.length;
const timeLeaveSeconds = timeLeave.leaveRoom * 5000
clearTimeout(leaveTimer);
leaveTimer = setTimeout(() => {
if (callUsersCount < 2) {
alert('hey')
}
}, timeLeaveSeconds)
}