Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/leadin/scripts/utils
File: iframe.ts
import { useEffect, useState } from 'react';
[0] Fix | Delete
[1] Fix | Delete
const IFRAME_DISPLAY_TIMEOUT = 5000;
[2] Fix | Delete
[3] Fix | Delete
export function useIframeNotRendered(app: string) {
[4] Fix | Delete
const [iframeNotRendered, setIframeNotRendered] = useState(false);
[5] Fix | Delete
useEffect(() => {
[6] Fix | Delete
const timer = setTimeout(() => {
[7] Fix | Delete
const iframe = document.getElementById(app);
[8] Fix | Delete
if (!iframe) {
[9] Fix | Delete
setIframeNotRendered(true);
[10] Fix | Delete
}
[11] Fix | Delete
}, IFRAME_DISPLAY_TIMEOUT);
[12] Fix | Delete
[13] Fix | Delete
return () => {
[14] Fix | Delete
if (timer) {
[15] Fix | Delete
clearTimeout(timer);
[16] Fix | Delete
}
[17] Fix | Delete
};
[18] Fix | Delete
}, []);
[19] Fix | Delete
[20] Fix | Delete
return iframeNotRendered;
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
export const resizeWindow = () => {
[24] Fix | Delete
const adminMenuWrap = document.getElementById('adminmenuwrap');
[25] Fix | Delete
const sideMenuHeight = adminMenuWrap ? adminMenuWrap.offsetHeight : 0;
[26] Fix | Delete
const adminBar = document.getElementById('wpadminbar');
[27] Fix | Delete
const adminBarHeight = (adminBar && adminBar.offsetHeight) || 0;
[28] Fix | Delete
const offset = 4;
[29] Fix | Delete
if (window.innerHeight < sideMenuHeight) {
[30] Fix | Delete
return sideMenuHeight - offset;
[31] Fix | Delete
} else {
[32] Fix | Delete
return window.innerHeight - adminBarHeight - offset;
[33] Fix | Delete
}
[34] Fix | Delete
};
[35] Fix | Delete
[36] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function