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

refactor .js files to ES modules where possible

This commit is contained in:
2024-03-12 14:58:00 -04:00
parent e66dc37c41
commit e1a26d5257
28 changed files with 460 additions and 414 deletions

View File

@@ -1,7 +1,6 @@
import HCaptcha from "@hcaptcha/react-hcaptcha";
import useHasMounted from "../../hooks/useHasMounted";
import useTheme from "../../hooks/useTheme";
import { hcaptchaSiteKey } from "../../lib/config";
export type CaptchaProps = {
size?: "normal" | "compact" | "invisible";
@@ -28,7 +27,7 @@ const Captcha = ({ size = "normal", theme, className, ...rest }: CaptchaProps) =
<div className={className}>
{hasMounted && (
<HCaptcha
sitekey={hcaptchaSiteKey || "10000000-ffff-ffff-ffff-000000000001"}
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY || "10000000-ffff-ffff-ffff-000000000001"}
reCaptchaCompat={false}
tabIndex={0}
size={size}