* Verify - inital email commit * Add token type - api redirect - migration * Redirect and valid api callback route * Update email design * Change signup URL to redirect to verify-email * Add feature flag - add a11y text to email - add top banner * Shell shouldnt redirect to onboarding if the user needs to verify account * Move flag check to server * Cleanup * Rate limit * Fix redirects * Remove api signup mess * Double negation for forced bool * Fix props * Update packages/emails/templates/account-verify-email.ts * Enable migration by default * Fix typos * Fix google verify issue * Update packages/features/auth/lib/verifyEmail.ts Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * NITS: @harioms addressed * Remove schema changes * Fix NITs+ improvments * Update apps/web/pages/api/auth/verify-email.ts Co-authored-by: Omar López <zomars@me.com> * Update packages/features/ee/common/components/LicenseRequired.tsx Co-authored-by: Omar López <zomars@me.com> * Update apps/web/pages/api/auth/verify-email.ts Co-authored-by: Omar López <zomars@me.com> * Always preloads feature flags * Update verifyEmail.ts * Update schema.prisma * Type fix --------- Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Omar López <zomars@me.com>
62 lines
2.0 KiB
TypeScript
62 lines
2.0 KiB
TypeScript
import type { LucideIcon as IconType } from "lucide-react";
|
|
import type { ReactNode } from "react";
|
|
import React from "react";
|
|
|
|
import { classNames } from "@calcom/lib";
|
|
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
|
|
|
import { Button } from "../../components/button";
|
|
|
|
export function EmptyScreen({
|
|
Icon,
|
|
avatar,
|
|
headline,
|
|
description,
|
|
buttonText,
|
|
buttonOnClick,
|
|
buttonRaw,
|
|
border = true,
|
|
dashedBorder = true,
|
|
className,
|
|
}: {
|
|
Icon?: SVGComponent | IconType;
|
|
avatar?: React.ReactElement;
|
|
headline: string | React.ReactElement;
|
|
description: string | React.ReactElement;
|
|
buttonText?: string;
|
|
buttonOnClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
buttonRaw?: ReactNode; // Used incase you want to provide your own button.
|
|
border?: boolean;
|
|
dashedBorder?: boolean;
|
|
} & React.HTMLAttributes<HTMLDivElement>) {
|
|
return (
|
|
<>
|
|
<div
|
|
data-testid="empty-screen"
|
|
className={classNames(
|
|
"min-h-80 flex w-full flex-col items-center justify-center rounded-md p-7 lg:p-20",
|
|
border && "border-subtle border",
|
|
dashedBorder && "border-dashed",
|
|
className
|
|
)}>
|
|
{!avatar ? null : (
|
|
<div className="flex h-[72px] w-[72px] items-center justify-center rounded-full">{avatar}</div>
|
|
)}
|
|
{!Icon ? null : (
|
|
<div className="bg-emphasis flex h-[72px] w-[72px] items-center justify-center rounded-full ">
|
|
<Icon className="text-default inline-block h-10 w-10 stroke-[1.3px]" />
|
|
</div>
|
|
)}
|
|
<div className="flex max-w-[420px] flex-col items-center">
|
|
<h2 className="text-semibold font-cal text-emphasis mt-6 text-center text-xl">{headline}</h2>
|
|
<div className="text-default mt-3 mb-8 text-center text-sm font-normal leading-6">
|
|
{description}
|
|
</div>
|
|
{buttonOnClick && buttonText && <Button onClick={(e) => buttonOnClick(e)}>{buttonText}</Button>}
|
|
{buttonRaw}
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|