Update turnstiles and pray

This commit is contained in:
Captain Jack Sparrow 2024-06-04 19:37:54 +00:00
parent 384cc43936
commit 78b9e042d0
2 changed files with 5 additions and 2 deletions

View File

@ -20,7 +20,10 @@ export interface OverlayProps {
function TurnstileInteractive() {
const { t } = useTranslation();
const [show, setShow] = useState(false);
getTurnstile();
useEffect(() => {
getTurnstile();
}, []);
// this may not rerender with different dom structure, must be exactly the same always
return (

View File

@ -101,7 +101,7 @@ export function TurnstileProvider(props: {
isInPopout?: boolean;
onUpdateShow?: (show: boolean) => void;
}) {
const siteKey = conf().TURNSTILE_KEY;
const siteKey = conf().TURNSTILE_KEY?.toString();
const idRef = useRef<string | null>(null);
const setTurnstile = useTurnstileStore((s) => s.setTurnstile);
const processToken = useTurnstileStore((s) => s.processToken);