Skip to content

Commit

Permalink
fix: show VerifyCodeDialog and RedirectToInstantMeetingModal when ski…
Browse files Browse the repository at this point in the history
…ping confirm step
  • Loading branch information
SomayChauhan committed Feb 21, 2025
1 parent 6b78a54 commit 903b37f
Showing 1 changed file with 32 additions and 43 deletions.
75 changes: 32 additions & 43 deletions packages/features/bookings/Booker/Booker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,69 +211,28 @@ const BookerComponent = ({
extraOptions={extraOptions}
rescheduleUid={rescheduleUid}
isVerificationCodeSending={isVerificationCodeSending}
isPlatform={isPlatform}>
<>
{verifyCode && formEmail ? (
<VerifyCodeDialog
isOpenDialog={isEmailVerificationModalVisible}
setIsOpenDialog={setEmailVerificationModalVisible}
email={formEmail}
isUserSessionRequiredToVerify={false}
verifyCodeWithSessionNotRequired={verifyCode.verifyCodeWithSessionNotRequired}
verifyCodeWithSessionRequired={verifyCode.verifyCodeWithSessionRequired}
error={verifyCode.error}
resetErrors={verifyCode.resetErrors}
isPending={verifyCode.isPending}
setIsPending={verifyCode.setIsPending}
/>
) : (
<></>
)}
{!isPlatform && (
<RedirectToInstantMeetingModal
expiryTime={expiryTime}
bookingId={parseInt(getQueryParam("bookingId") || "0")}
instantVideoMeetingUrl={instantVideoMeetingUrl}
onGoBack={() => {
onGoBackInstantMeeting();
}}
orgName={event.data?.entity?.name}
/>
)}
</>
</BookEventForm>
isPlatform={isPlatform}
/>
) : (
<></>
);
}, [
bookerFormErrorRef,
instantVideoMeetingUrl,
bookerState,
bookingForm,
errors,
event,
expiryTime,
extraOptions,
formEmail,
formErrors,
handleBookEvent,
handleVerifyEmail,
isEmailVerificationModalVisible,
key,
loadingStates,
onGoBackInstantMeeting,
renderConfirmNotVerifyEmailButtonCond,
rescheduleUid,
seatedEventData,
setEmailVerificationModalVisible,
setSeatedEventData,
setSelectedTimeslot,
verifyCode?.error,
verifyCode?.isPending,
verifyCode?.resetErrors,
verifyCode?.setIsPending,
verifyCode?.verifyCodeWithSessionNotRequired,
verifyCode?.verifyCodeWithSessionRequired,
isPlatform,
shouldRenderCaptcha,
isVerificationCodeSending,
Expand Down Expand Up @@ -533,6 +492,36 @@ const BookerComponent = ({
)}
</div>

<>
{verifyCode && formEmail ? (
<VerifyCodeDialog
isOpenDialog={isEmailVerificationModalVisible}
setIsOpenDialog={setEmailVerificationModalVisible}
email={formEmail}
isUserSessionRequiredToVerify={false}
verifyCodeWithSessionNotRequired={verifyCode.verifyCodeWithSessionNotRequired}
verifyCodeWithSessionRequired={verifyCode.verifyCodeWithSessionRequired}
error={verifyCode.error}
resetErrors={verifyCode.resetErrors}
isPending={verifyCode.isPending}
setIsPending={verifyCode.setIsPending}
/>
) : (
<></>
)}
{!isPlatform && (
<RedirectToInstantMeetingModal
expiryTime={expiryTime}
bookingId={parseInt(getQueryParam("bookingId") || "0")}
instantVideoMeetingUrl={instantVideoMeetingUrl}
onGoBack={() => {
onGoBackInstantMeeting();
}}
orgName={event.data?.entity?.name}
/>
)}
</>

<BookFormAsModal
onCancel={() => setSelectedTimeslot(null)}
visible={bookerState === "booking" && shouldShowFormInDialog}>
Expand Down

0 comments on commit 903b37f

Please sign in to comment.