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/clone/wp-conte.../plugins/leadin/scripts/shared/Meeting
File: PreviewMeeting.tsx
import React, { Fragment, useEffect, useRef } from 'react';
[0] Fix | Delete
import UIOverlay from '../UIComponents/UIOverlay';
[1] Fix | Delete
import useMeetingsScript from './hooks/useMeetingsScript';
[2] Fix | Delete
[3] Fix | Delete
interface IPreviewForm {
[4] Fix | Delete
url: string;
[5] Fix | Delete
}
[6] Fix | Delete
[7] Fix | Delete
export default function PreviewForm({ url }: IPreviewForm) {
[8] Fix | Delete
const ready = useMeetingsScript();
[9] Fix | Delete
const inputEl = useRef<HTMLDivElement>(null);
[10] Fix | Delete
[11] Fix | Delete
useEffect(() => {
[12] Fix | Delete
if (!ready) {
[13] Fix | Delete
return;
[14] Fix | Delete
}
[15] Fix | Delete
if (inputEl.current) {
[16] Fix | Delete
inputEl.current.innerHTML = '';
[17] Fix | Delete
const container = document.createElement('div');
[18] Fix | Delete
container.dataset.src = `${url}?embed=true`;
[19] Fix | Delete
container.classList.add('meetings-iframe-container');
[20] Fix | Delete
inputEl.current.appendChild(container);
[21] Fix | Delete
const embedScript = document.createElement('script');
[22] Fix | Delete
embedScript.innerHTML =
[23] Fix | Delete
'hbspt.meetings.create(".meetings-iframe-container");';
[24] Fix | Delete
inputEl.current.appendChild(embedScript);
[25] Fix | Delete
}
[26] Fix | Delete
}, [url, ready, inputEl]);
[27] Fix | Delete
[28] Fix | Delete
return <Fragment>{url && <UIOverlay ref={inputEl}></UIOverlay>}</Fragment>;
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function