chg: usr: replace Google ReCaptcha with Cap instance #13
This commit is contained in:
@@ -19,7 +19,7 @@ export const GameBoard = ({ gameAssoc, gameInherited, opponentName = '', isEnvDe
|
||||
const { onClick, resign } = useServerCommunication(gameAssoc, gameInherited, opponentName, isEnvDev);
|
||||
const [captchaVerified, setCaptchaVerified] = useState(false);
|
||||
|
||||
const siteKey = document.getElementById('mine-wrapper')?.dataset.recaptchaSiteKey;
|
||||
const apiEndpoint = document.getElementById('mine-wrapper')?.dataset.capApiEndpoint;
|
||||
|
||||
if (!gridReady) {
|
||||
return (
|
||||
@@ -29,9 +29,9 @@ export const GameBoard = ({ gameAssoc, gameInherited, opponentName = '', isEnvDe
|
||||
);
|
||||
}
|
||||
|
||||
if (!captchaVerified && siteKey) {
|
||||
if (!captchaVerified && apiEndpoint) {
|
||||
return (
|
||||
<CaptchaOverlay siteKey={siteKey} onVerified={() => setCaptchaVerified(true)} />
|
||||
<CaptchaOverlay apiEndpoint={apiEndpoint} onVerified={() => setCaptchaVerified(true)} />
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user