Reverted to pre-dialog content (#2189)

This commit is contained in:
Alex van Andel 2022-03-17 19:21:47 +00:00 committed by GitHub
parent 95f92cac28
commit 39d395bf62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,6 @@ import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import Button from "@calcom/ui/Button";
import { Dialog, DialogContent, DialogFooter } from "@calcom/ui/Dialog";
import { EmailInput } from "@calcom/ui/form/fields";
import { asStringOrThrow, asStringOrNull } from "@lib/asStringOrNull";
@ -100,22 +99,28 @@ export default function Success(props: inferSSRProps<typeof getServerSideProps>)
/>
<CustomBranding lightVal={props.profile.brandColor} darkVal={props.profile.darkBrandColor} />
<main className="mx-auto max-w-3xl py-24">
<Dialog defaultOpen={true}>
<DialogContent
onInteractOutside={(e) => {
e.preventDefault();
}}>
<div className="fixed inset-0 z-50 overflow-y-auto">
<div className="flex min-h-screen items-end justify-center px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div className="fixed inset-0 my-4 transition-opacity sm:my-0" aria-hidden="true">
<span className="hidden sm:inline-block sm:h-screen sm:align-middle" aria-hidden="true">
&#8203;
</span>
<div
className="inline-block transform overflow-hidden rounded-sm border border-neutral-200 bg-white px-8 pt-5 pb-4 text-left align-bottom transition-all dark:border-neutral-700 dark:bg-gray-800 sm:my-8 sm:w-full sm:max-w-lg sm:py-6 sm:align-middle"
role="dialog"
aria-modal="true"
aria-labelledby="modal-headline">
<div>
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100">
{!needsConfirmation && <CheckIcon className="h-8 w-8 text-green-600" />}
{needsConfirmation && <ClockIcon className="h-8 w-8 text-green-600" />}
</div>
<div className="mt-5 flex justify-center">
<div className="mt-3 text-center sm:mt-5">
<h3
className="text-2xl font-semibold leading-6 text-neutral-900 dark:text-white"
id="modal-headline">
{needsConfirmation ? t("submitted") : t("meeting_is_scheduled")}
</h3>
</div>
<div className="mt-3">
<p className="text-sm text-neutral-600 dark:text-gray-300">
{needsConfirmation
@ -152,6 +157,8 @@ export default function Success(props: inferSSRProps<typeof getServerSideProps>)
</>
)}
</div>
</div>
</div>
{!needsConfirmation && (
<div className="mt-5 flex border-b pt-2 pb-4 text-center dark:border-gray-900 sm:mt-0 sm:pt-4">
<span className="flex self-center font-medium text-gray-700 ltr:mr-2 rtl:ml-2 dark:text-gray-50">
@ -167,7 +174,8 @@ export default function Success(props: inferSSRProps<typeof getServerSideProps>)
.utc()
.format("YYYYMMDDTHHmmss[Z]")}&text=${eventName}&details=${
props.eventType.description
}` + (typeof location === "string" ? "&location=" + encodeURIComponent(location) : "")
}` +
(typeof location === "string" ? "&location=" + encodeURIComponent(location) : "")
}>
<a className="mx-2 h-10 w-10 rounded-sm border border-neutral-200 px-3 py-2 dark:border-neutral-700 dark:text-white">
<svg
@ -250,8 +258,6 @@ export default function Success(props: inferSSRProps<typeof getServerSideProps>)
</div>
</div>
)}
<div className="flex justify-center">
<DialogFooter>
{!props.hideBranding && (
<div className="pt-4 text-center text-xs text-gray-400 dark:border-gray-900 dark:text-white">
<a href="https://cal.com/signup">{t("create_booking_link_with_calcom")}</a>
@ -275,10 +281,10 @@ export default function Success(props: inferSSRProps<typeof getServerSideProps>)
</form>
</div>
)}
</DialogFooter>
</div>
</DialogContent>
</Dialog>
</div>
</div>
</div>
</main>
</div>
)) ||