docs: fix messy layout bug (#12248)
This commit is contained in:
@@ -121,6 +121,17 @@ export const useRecaptcha = ({ siteKey }: UseRecaptchaProps) => {
|
|||||||
}
|
}
|
||||||
}, [isScriptLoaded])
|
}, [isScriptLoaded])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isExecuteReady) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const recaptchaElm = document.querySelector(".grecaptcha-badge")
|
||||||
|
if (recaptchaElm?.parentElement) {
|
||||||
|
recaptchaElm.parentElement.classList.add("absolute")
|
||||||
|
}
|
||||||
|
}, [isExecuteReady])
|
||||||
|
|
||||||
const execute = useCallback(
|
const execute = useCallback(
|
||||||
async (actionName: RecaptchaAction): Promise<string> => {
|
async (actionName: RecaptchaAction): Promise<string> => {
|
||||||
if (!isExecuteReady) {
|
if (!isExecuteReady) {
|
||||||
|
|||||||
Reference in New Issue
Block a user