chg: pkg: upgrade both backend and frontend to the latest available version #13
This commit is contained in:
+3
-4
@@ -73,12 +73,11 @@ const bindInvisibleCap = (form, apiEndpoint) => {
|
||||
};
|
||||
|
||||
const initInvisibleCap = () => {
|
||||
const endpointSource =
|
||||
document.querySelector('[data-cap-api-endpoint]') ||
|
||||
document.getElementById('mine-wrapper');
|
||||
const endpointSource = document.querySelector('[data-cap-api-endpoint]')
|
||||
|| document.getElementById('mine-wrapper');
|
||||
const apiEndpoint = endpointSource?.dataset.capApiEndpoint;
|
||||
|
||||
if (!apiEndpoint || typeof window.Cap !== 'function') {
|
||||
if ('function' !== typeof window.Cap || !apiEndpoint) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ const CaptchaOverlay = ({ apiEndpoint, onVerified, children }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const storedToken = sessionStorage.getItem(CAPTCHA_TOKEN_KEY);
|
||||
const storedTime = sessionStorage.getItem(CAPTCHA_STORAGE_KEY);
|
||||
const storedTime = sessionStorage.getItem(CAPTCHA_STORAGE_KEY);
|
||||
|
||||
if (storedToken && storedTime) {
|
||||
const elapsed = (Date.now() - parseInt(storedTime)) / 1000;
|
||||
@@ -80,7 +80,7 @@ const CaptchaOverlay = ({ apiEndpoint, onVerified, children }) => {
|
||||
widget.remove();
|
||||
capRef.current = null;
|
||||
};
|
||||
}, [handleToken]);
|
||||
}, [apiEndpoint, handleToken]);
|
||||
|
||||
if (verified) {
|
||||
return <Fragment>{children}</Fragment>;
|
||||
|
||||
Reference in New Issue
Block a user