chg: pkg: upgrade all front-end packages to the latest available version - and fix all eslint warnings & errors #7
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
const CAPTCHA_STORAGE_KEY = 'mineseeker_captcha_verified';
|
||||
const CAPTCHA_TOKEN_KEY = 'mineseeker_captcha_token';
|
||||
@@ -46,9 +46,9 @@ const CaptchaOverlay = ({ siteKey, onVerified, children }) => {
|
||||
});
|
||||
});
|
||||
}
|
||||
}, [siteKey, onVerified]);
|
||||
}, [siteKey, onVerified, handleToken]);
|
||||
|
||||
const handleToken = token => {
|
||||
const handleToken = useCallback(token => {
|
||||
const wrapper = document.getElementById('mine-wrapper');
|
||||
if (wrapper) {
|
||||
wrapper.dataset.captchaToken = token;
|
||||
@@ -57,7 +57,7 @@ const CaptchaOverlay = ({ siteKey, onVerified, children }) => {
|
||||
sessionStorage.setItem(CAPTCHA_STORAGE_KEY, Date.now().toString());
|
||||
setVerified(true);
|
||||
onVerified?.();
|
||||
};
|
||||
}, [onVerified]);
|
||||
|
||||
const handleClick = () => {
|
||||
setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user