1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 01:01:17 -04:00

remove per-page getLayout option (maybe temporarily?)

This commit is contained in:
2022-04-19 17:38:20 -04:00
parent d5690d2972
commit d50ae0f85a
10 changed files with 228 additions and 314 deletions

View File

@@ -1,5 +1,4 @@
import { memo } from "react";
import Head from "next/head";
import HCaptcha from "@hcaptcha/react-hcaptcha";
import { useHasMounted } from "../../hooks/use-has-mounted";
import { useTheme } from "../../hooks/use-theme";
@@ -26,25 +25,18 @@ const Captcha = ({ size = "normal", theme, className, ...rest }: CaptchaProps) =
const { resolvedTheme } = useTheme();
return (
<>
<Head>
<link rel="preconnect" href="https://js.hcaptcha.com" />
<link rel="preconnect" href="https://newassets.hcaptcha.com" />
</Head>
<div className={className}>
{hasMounted && (
<HCaptcha
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY}
reCaptchaCompat={false}
tabIndex={0}
size={size}
theme={theme || (resolvedTheme === "dark" ? "dark" : "light")}
{...rest}
/>
)}
</div>
</>
<div className={className}>
{hasMounted && (
<HCaptcha
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY}
reCaptchaCompat={false}
tabIndex={0}
size={size}
theme={theme || (resolvedTheme === "dark" ? "dark" : "light")}
{...rest}
/>
)}
</div>
);
};