mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-25 03:55:58 -04:00
remove dependency on uglify-js
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
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";
|
||||
@@ -27,7 +28,7 @@ const Captcha = ({ size = "normal", theme, className, ...rest }: CaptchaProps) =
|
||||
<div className={className}>
|
||||
{hasMounted && (
|
||||
<HCaptcha
|
||||
sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY || ""}
|
||||
sitekey={hcaptchaSiteKey || "10000000-ffff-ffff-ffff-000000000001"}
|
||||
reCaptchaCompat={false}
|
||||
tabIndex={0}
|
||||
size={size}
|
||||
|
||||
@@ -43,7 +43,10 @@ const Link = ({ href, rel, target, prefetch = false, underline = true, openInNew
|
||||
// links) or a new tab (the default for external links). Defaults can be overridden with `openInNewTab={true}`.
|
||||
const isExternal =
|
||||
typeof href === "string" &&
|
||||
!(href[0] === "/" || href[0] === "#" || (process.env.BASE_URL && href.startsWith(process.env.BASE_URL)));
|
||||
!(
|
||||
["/", "#"].includes(href[0]) ||
|
||||
(process.env.NEXT_PUBLIC_BASE_URL && href.startsWith(process.env.NEXT_PUBLIC_BASE_URL))
|
||||
);
|
||||
|
||||
if (openInNewTab || isExternal) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user