import React from 'react'; import CombineIcon from '../../assets/images/Combine.svg'; import { ActiveCallItem } from '../ActiveCallItemV2'; import BackButton from '../BackButton'; import BackHeader from '../BackHeader'; import CircleButton from '../CircleButton'; import i18n from './i18n'; import styles from './styles.scss'; type CallsOnholdContainerProps = { currentLocale: string; onMerge?: (...args: any[]) => any; calls: any[]; areaCode: string; countryCode: string; brand?: string; showContactDisplayPlaceholder?: boolean; showCallerIdName?: boolean; webphoneAnswer?: (...args: any[]) => any; webphoneReject?: (...args: any[]) => any; webphoneHangup?: (...args: any[]) => any; webphoneResume?: (...args: any[]) => any; webphoneToVoicemail?: (...args: any[]) => any; enableContactFallback?: boolean; autoLog?: boolean; sourceIcons?: object; phoneTypeRenderer?: (...args: any[]) => any; phoneSourceNameRenderer?: (...args: any[]) => any; onBackButtonClick?: (...args: any[]) => any; disableMerge?: boolean; onAdd?: (...args: any[]) => any; getAvatarUrl?: (...args: any[]) => any; }; const CallsOnholdContainer: React.FC = ({ calls, currentLocale, areaCode, countryCode, brand, showContactDisplayPlaceholder, autoLog, showCallerIdName, webphoneAnswer, webphoneReject, webphoneHangup, webphoneResume, webphoneToVoicemail, enableContactFallback, sourceIcons, phoneTypeRenderer, phoneSourceNameRenderer, disableMerge, onBackButtonClick, onMerge, onAdd, getAvatarUrl, }) => { const backHeader = ( } /> ); return (
{backHeader}
{calls.length ? ( calls.map((call) => ( any) | undefined' is no... Remove this comment to see the full error message webphoneAnswer={webphoneAnswer} // @ts-expect-error TS(2322): Type '((...args: any[]) => any) | undefined' is no... Remove this comment to see the full error message webphoneReject={webphoneReject} // @ts-expect-error TS(2322): Type '((...args: any[]) => any) | undefined' is no... Remove this comment to see the full error message webphoneHangup={webphoneHangup} // @ts-expect-error TS(2322): Type '((...args: any[]) => any) | undefined' is no... Remove this comment to see the full error message webphoneResume={webphoneResume} // @ts-expect-error TS(2322): Type '((...args: any[]) => any) | undefined' is no... Remove this comment to see the full error message webphoneToVoicemail={webphoneToVoicemail} enableContactFallback={enableContactFallback} autoLog={autoLog} sourceIcons={sourceIcons} phoneTypeRenderer={phoneTypeRenderer} phoneSourceNameRenderer={phoneSourceNameRenderer} disableMerge={disableMerge} hasActionMenu={false} showAnswer={false} getAvatarUrl={getAvatarUrl} showHold={false} /> )) ) : (
{i18n.getString('noCalls', currentLocale)}
)}
); }; CallsOnholdContainer.defaultProps = { brand: 'RingCentral', showContactDisplayPlaceholder: true, webphoneAnswer: undefined, webphoneReject: undefined, webphoneHangup: undefined, webphoneResume: undefined, enableContactFallback: undefined, autoLog: false, webphoneToVoicemail: undefined, sourceIcons: undefined, phoneTypeRenderer: undefined, phoneSourceNameRenderer: undefined, onBackButtonClick: undefined, onAdd: undefined, onMerge: undefined, disableMerge: false, getAvatarUrl: (i) => i, }; export default CallsOnholdContainer;