* refactor: move auth components and hooks from packages/features to apps/web/modules Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix: add vitest import to Turnstile mock Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
13 lines
415 B
TypeScript
13 lines
415 B
TypeScript
import type { TurnstileProps } from "react-turnstile";
|
|
import Turnstile from "react-turnstile";
|
|
|
|
import { CLOUDFLARE_SITE_ID } from "@calcom/lib/constants";
|
|
|
|
type Props = Omit<TurnstileProps, "sitekey">;
|
|
|
|
export default function TurnstileWidget(props: Props) {
|
|
if (!CLOUDFLARE_SITE_ID || process.env.NEXT_PUBLIC_IS_E2E) return null;
|
|
|
|
return <Turnstile {...props} sitekey={CLOUDFLARE_SITE_ID} theme="auto" />;
|
|
}
|