function onDietFormSubmit(e) {
  e.preventDefault();
  // Check that the user entered a message and is signed in.
  if (isUserSignedIn()) {
    saveDiet(app.dietPlanList, app.dietPlanID);
  } else {
    console.log("User Not Signed In");
  }
}
// Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted .
function onDietFormSubmit(e) {
  e.preventDefault();
  if (isUserSignedIn()) {
    saveDiet(app.dietPlanList, app.dietPlanID);
  } else {
    console.log("User Not Signed In");
  }
}
function onDietFormSubmit ( e ) { e . preventDefault ( ) ; if ( isUserSignedIn ( ) ) { saveDiet ( app . dietPlanList , app . dietPlanID ) ; } else { console . log ( "User Not Signed In" ) ; } }
Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted .
// Check that the user entered a message and is signed in.