Handles the event when a user joins the waiting room, displaying a notification and updating the count of waiting requests.
const options = { name: "John Doe", showAlert: (alert) => console.log(alert.message), totalReqWait: 3, updateTotalReqWait: (total) => console.log("Updated total:", total),};userWaiting(options) .then(() => console.log("User waiting handled")) .catch((error) => console.error("Error:", error)); Copy
const options = { name: "John Doe", showAlert: (alert) => console.log(alert.message), totalReqWait: 3, updateTotalReqWait: (total) => console.log("Updated total:", total),};userWaiting(options) .then(() => console.log("User waiting handled")) .catch((error) => console.error("Error:", error));
The options for managing the user waiting event.
A promise that resolves when the waiting event is fully handled.
Handles the event when a user joins the waiting room, displaying a notification and updating the count of waiting requests.
Example