: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
import React, { Fragment, useState } from 'react';
import ElementorBanner from '../Common/ElementorBanner';
import UISpinner from '../../shared/UIComponents/UISpinner';
import ElementorMeetingWarning from './ElementorMeetingWarning';
useSelectedMeetingCalendar,
} from '../../shared/Meeting/hooks/useMeetings';
import { __ } from '@wordpress/i18n';
import Raven from 'raven-js';
} from '../../iframe/useBackgroundApp';
import { refreshToken } from '../../constants/leadinConfig';
import { getOrCreateBackgroundApp } from '../../utils/backgroundAppUtils';
interface IElementorMeetingSelectProps {
function ElementorMeetingSelect({
}: IElementorMeetingSelectProps) {
mappedMeetings: meetings,
const selectedMeetingCalendar = useSelectedMeetingCalendar(url);
const [localUrl, setLocalUrl] = useState(url);
const handleConnectCalendar = () => {
Raven.captureMessage('Unable to connect calendar', {
<ElementorBanner type="danger">
'Please refresh your meetings or try again in a few minutes',
{selectedMeetingCalendar && (
status={selectedMeetingCalendar}
onConnectCalendar={connectCalendar}
{meetings.length > 1 && (
const newUrl = event.target.value;
<option value="" disabled={true} selected={true}>
{__('Select a meeting', 'leadin')}
<option key={item.value} value={item.value}>
function ElementorMeetingSelectWrapper(props: IElementorMeetingSelectProps) {
const isBackgroundAppReady = useBackgroundAppContext();
{!isBackgroundAppReady ? (
<ElementorMeetingSelect {...props} />
export default function ElementorMeetingsSelectContainer(
props: IElementorMeetingSelectProps
<BackgroudAppContext.Provider
value={refreshToken && getOrCreateBackgroundApp(refreshToken)}
<ElementorMeetingSelectWrapper {...props} />
</BackgroudAppContext.Provider>