mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 01:01:17 -04:00
add react-textarea-autosize
to contact form
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { memo } from "react";
|
||||
import Head from "next/head";
|
||||
import { useTheme } from "next-themes";
|
||||
import HCaptcha from "@hcaptcha/react-hcaptcha";
|
||||
|
||||
@@ -23,15 +24,22 @@ const Captcha = ({ size = "normal", theme, id, ...rest }: CaptchaProps) => {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
return (
|
||||
<HCaptcha
|
||||
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY}
|
||||
reCaptchaCompat={false}
|
||||
tabIndex={0}
|
||||
size={size}
|
||||
theme={theme || (resolvedTheme === "dark" ? "dark" : "light")}
|
||||
id={id}
|
||||
{...rest}
|
||||
/>
|
||||
<>
|
||||
<Head>
|
||||
<link rel="preconnect" href="https://js.hcaptcha.com" />
|
||||
<link rel="preconnect" href="https://newassets.hcaptcha.com" />
|
||||
</Head>
|
||||
|
||||
<HCaptcha
|
||||
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY}
|
||||
reCaptchaCompat={false}
|
||||
tabIndex={0}
|
||||
size={size}
|
||||
theme={theme || (resolvedTheme === "dark" ? "dark" : "light")}
|
||||
id={id}
|
||||
{...rest}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user