1
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:
2022-02-11 09:25:25 -05:00
parent 9aaf1ef1e7
commit 93356e9472
5 changed files with 140 additions and 92 deletions

View File

@@ -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}
/>
</>
);
};