mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-18 11:40:48 +08:00
Merge pull request #932 from notmd/911_sigin_captcha
911 signin captcha
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { useColorMode } from "@chakra-ui/react";
|
||||
import { Turnstile, TurnstileInstance, TurnstileProps } from "@marsidev/react-turnstile";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
export const CloudFlareCaptcha = forwardRef<TurnstileInstance, Omit<TurnstileProps, "siteKey">>((props, ref) => {
|
||||
const { colorMode } = useColorMode();
|
||||
return (
|
||||
<Turnstile
|
||||
ref={ref}
|
||||
{...props}
|
||||
siteKey={process.env.NEXT_PUBLIC_CLOUDFLARE_CAPTCHA_SITE_KEY}
|
||||
options={{
|
||||
theme: colorMode,
|
||||
...props.options,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
CloudFlareCaptcha.displayName = "CloudFlareCaptcha";
|
||||
Reference in New Issue
Block a user