Bugfix CAL-566 guest emails missing (#905)

* removed empty dep from useCallback of bookingHandler

* added guestEmails as the dep instead of no dep

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
pull/858/head^2
Syed Ali Shahbaz 2021-10-12 13:59:12 +05:30 committed by GitHub
parent f27b0b3cad
commit 7dc4a55319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ const BookingPage = (props: BookingPageProps) => {
book();
};
const bookingHandler = useCallback(_bookingHandler, []);
const bookingHandler = useCallback(_bookingHandler, [guestEmails]);
return (
<div>
@ -254,7 +254,7 @@ const BookingPage = (props: BookingPageProps) => {
<div className="sm:w-1/2 sm:pl-8 sm:pr-4">
<form onSubmit={bookingHandler}>
<div className="mb-4">
<label htmlFor="name" className="block text-sm font-medium dark:text-white text-gray-700">
<label htmlFor="name" className="block text-sm font-medium text-gray-700 dark:text-white">
{t("your_name")}
</label>
<div className="mt-1">
@ -272,7 +272,7 @@ const BookingPage = (props: BookingPageProps) => {
<div className="mb-4">
<label
htmlFor="email"
className="block text-sm font-medium dark:text-white text-gray-700">
className="block text-sm font-medium text-gray-700 dark:text-white">
{t("email_address")}
</label>
<div className="mt-1">
@ -446,7 +446,7 @@ const BookingPage = (props: BookingPageProps) => {
name="notes"
id="notes"
rows={3}
className="shadow-sm dark:bg-black dark:text-white dark:border-gray-900 focus:ring-black focus:border-black block w-full sm:text-sm border-gray-300 rounded-md"
className="block w-full border-gray-300 rounded-md shadow-sm dark:bg-black dark:text-white dark:border-gray-900 focus:ring-black focus:border-black sm:text-sm"
placeholder={t("share_additional_notes")}
defaultValue={props.booking ? props.booking.description : ""}
/>