Private
Public Access
1
0

chg: pkg: upgrade all front-end packages to the latest available version - and fix all eslint warnings & errors #7

This commit is contained in:
2026-04-19 21:04:15 +02:00
parent 9256db7f8c
commit db37ab45b2
4 changed files with 92 additions and 80 deletions

View File

@@ -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);