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: MeetingEdit.tsx
import React, { Fragment, useEffect } from 'react';
[0] Fix | Delete
import { IMeetingBlockProps } from '../../gutenberg/MeetingsBlock/registerMeetingBlock';
[1] Fix | Delete
import MeetingController from './MeetingController';
[2] Fix | Delete
import PreviewMeeting from './PreviewMeeting';
[3] Fix | Delete
import {
[4] Fix | Delete
BackgroudAppContext,
[5] Fix | Delete
useBackgroundAppContext,
[6] Fix | Delete
usePostBackgroundMessage,
[7] Fix | Delete
} from '../../iframe/useBackgroundApp';
[8] Fix | Delete
import { refreshToken } from '../../constants/leadinConfig';
[9] Fix | Delete
import { ProxyMessages } from '../../iframe/integratedMessages';
[10] Fix | Delete
import LoadingBlock from '../Common/LoadingBlock';
[11] Fix | Delete
import { getOrCreateBackgroundApp } from '../../utils/backgroundAppUtils';
[12] Fix | Delete
[13] Fix | Delete
interface IMeetingEditProps extends IMeetingBlockProps {
[14] Fix | Delete
preview?: boolean;
[15] Fix | Delete
origin?: 'gutenberg' | 'elementor';
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
function MeetingEdit({
[19] Fix | Delete
attributes: { url },
[20] Fix | Delete
isSelected,
[21] Fix | Delete
setAttributes,
[22] Fix | Delete
preview = true,
[23] Fix | Delete
origin = 'gutenberg',
[24] Fix | Delete
}: IMeetingEditProps) {
[25] Fix | Delete
const isBackgroundAppReady = useBackgroundAppContext();
[26] Fix | Delete
const monitorFormPreviewRender = usePostBackgroundMessage();
[27] Fix | Delete
[28] Fix | Delete
const handleChange = (newUrl: string) => {
[29] Fix | Delete
setAttributes({
[30] Fix | Delete
url: newUrl,
[31] Fix | Delete
});
[32] Fix | Delete
};
[33] Fix | Delete
[34] Fix | Delete
useEffect(() => {
[35] Fix | Delete
monitorFormPreviewRender({
[36] Fix | Delete
key: ProxyMessages.TrackMeetingPreviewRender,
[37] Fix | Delete
payload: {
[38] Fix | Delete
origin,
[39] Fix | Delete
},
[40] Fix | Delete
});
[41] Fix | Delete
}, [origin]);
[42] Fix | Delete
[43] Fix | Delete
return !isBackgroundAppReady ? (
[44] Fix | Delete
<LoadingBlock />
[45] Fix | Delete
) : (
[46] Fix | Delete
<Fragment>
[47] Fix | Delete
{(isSelected || !url) && (
[48] Fix | Delete
<MeetingController url={url} handleChange={handleChange} />
[49] Fix | Delete
)}
[50] Fix | Delete
{preview && url && <PreviewMeeting url={url} />}
[51] Fix | Delete
</Fragment>
[52] Fix | Delete
);
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
export default function MeetingsEditContainer(props: IMeetingEditProps) {
[56] Fix | Delete
return (
[57] Fix | Delete
<BackgroudAppContext.Provider
[58] Fix | Delete
value={refreshToken && getOrCreateBackgroundApp(refreshToken)}
[59] Fix | Delete
>
[60] Fix | Delete
<MeetingEdit {...props} />
[61] Fix | Delete
</BackgroudAppContext.Provider>
[62] Fix | Delete
);
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function