merge: 同步 origin/main (v1.4.0) 到定制版本
Build and Release / Build (push) Has been cancelled

This commit is contained in:
2026-03-19 02:56:42 -07:00
parent 6b92979c7c
commit 830430645c
12 changed files with 209 additions and 30 deletions
+2
View File
@@ -14,6 +14,8 @@
},
"dependencies": {
"@faker-js/faker": "^10.0.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"@lottiefiles/dotlottie-react": "^0.17.7",
"@stripe/react-stripe-js": "^5.4.0",
"@stripe/stripe-js": "^8.5.2",
+13 -10
View File
@@ -1,7 +1,7 @@
"use client";
import { useTheme } from "next-themes";
import { forwardRef, useEffect, useImperativeHandle } from "react";
import { type RefObject, useEffect, useImperativeHandle } from "react";
import { useTranslation } from "react-i18next";
import Turnstile, { useTurnstile } from "react-turnstile";
import { useGlobalStore } from "@/stores/global";
@@ -10,14 +10,17 @@ export type TurnstileRef = {
reset: () => void;
};
const CloudFlareTurnstile = forwardRef<
TurnstileRef,
{
id?: string;
value?: null | string;
onChange: (value?: string) => void;
}
>(function CloudFlareTurnstile({ id, value, onChange }, ref) {
const CloudFlareTurnstile = function CloudFlareTurnstile({
id,
value,
onChange,
ref,
}: {
id?: string;
value?: null | string;
onChange: (value?: string) => void;
ref?: RefObject<TurnstileRef | null>;
}) {
const { common } = useGlobalStore();
const { verify } = common;
const { resolvedTheme } = useTheme();
@@ -63,6 +66,6 @@ const CloudFlareTurnstile = forwardRef<
/>
)
);
});
};
export default CloudFlareTurnstile;