async function saveMessage(messageText, continousCheck) {
  // Add a new message entry to the Firebase database.
  try {
    await addDoc(collection(getFirestore(), getUserMail()), {
      quantity: messageText,
      continous: continousCheck,
      timestamp: serverTimestamp(),
      name: getUserName()
    });
  }
  catch(error) {
    console.error('Error writing new message to Firebase Database', error);
  }
}
// Saves a new message to Cloud Firestore.
Saves a new message to Cloud Firestore.
Saves a new message to Cloud Firestore .
async function saveMessage(messageText, continousCheck) {
  try {
    await addDoc(collection(getFirestore(), getUserMail()), {
      quantity: messageText,
      continous: continousCheck,
      timestamp: serverTimestamp(),
      name: getUserName()
    });
  }
  catch(error) {
    console.error('Error writing new message to Firebase Database', error);
  }
}
async function saveMessage ( messageText , continousCheck ) { try { await addDoc ( collection ( getFirestore ( ) , getUserMail ( ) ) , { quantity : messageText , continous : continousCheck , timestamp : serverTimestamp ( ) , name : getUserName ( ) } ) ; } catch ( error ) { console . error ( 'Error writing new message to Firebase Database' , error ) ; } }
Saves a new message to Cloud Firestore.
Saves a new message to Cloud Firestore .
// Add a new message entry to the Firebase database.