From e33c676ec5eec9ae5085874aeb70dfc49120f3e1 Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:28:48 +0530 Subject: [PATCH] fix: toast message is not visble and some refactor (#15649) Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> --- packages/features/bookings/Booker/Booker.tsx | 4 ++++ .../Booker/components/BookEventForm/BookEventForm.tsx | 8 +++++++- .../bookings/Booker/components/hooks/useVerifyEmail.ts | 9 ++++++--- .../features/bookings/components/VerifyCodeDialog.tsx | 5 ++--- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsx index 64766efaea..d6467e47ac 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/packages/features/bookings/Booker/Booker.tsx @@ -1,6 +1,7 @@ import { AnimatePresence, LazyMotion, m } from "framer-motion"; import dynamic from "next/dynamic"; import { useEffect, useMemo, useRef } from "react"; +import { Toaster } from "react-hot-toast"; import StickyBox from "react-sticky-box"; import { shallow } from "zustand/shallow"; @@ -123,6 +124,7 @@ const BookerComponent = ({ setEmailVerificationModalVisible, handleVerifyEmail, renderConfirmNotVerifyEmailButtonCond, + isVerificationCodeSending, } = verifyEmail; const { @@ -171,6 +173,7 @@ const BookerComponent = ({ eventQuery={event} extraOptions={extraOptions} rescheduleUid={rescheduleUid} + isVerificationCodeSending={isVerificationCodeSending} isPlatform={isPlatform}> <> {verifyCode ? ( @@ -469,6 +472,7 @@ const BookerComponent = ({ visible={bookerState === "booking" && shouldShowFormInDialog}> {EventBooker} + ); }; diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx b/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx index 15e1c15cb7..6d29abf757 100644 --- a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx +++ b/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx @@ -27,6 +27,7 @@ type BookEventFormProps = { renderConfirmNotVerifyEmailButtonCond: boolean; extraOptions: Record; isPlatform?: boolean; + isVerificationCodeSending: boolean; }; export const BookEventForm = ({ @@ -41,6 +42,7 @@ export const BookEventForm = ({ bookingForm, children, extraOptions, + isVerificationCodeSending, isPlatform = false, }: Omit & { eventQuery: { @@ -154,7 +156,11 @@ export const BookEventForm = ({