import React from 'react'; import CallAvatar from '../CallAvatar'; import ContactDisplay from '../ContactDisplay'; import styles from './styles.scss'; type CallInfoProps = { phoneNumber?: string; formatPhone: (...args: any[]) => any; nameMatches: any[]; fallBackName: string; areaCode: string; countryCode: string; currentLocale: string; selectedMatcherIndex: number; onSelectMatcherName: (...args: any[]) => any; avatarUrl?: string; brand?: string; showContactDisplayPlaceholder?: boolean; sourceIcons?: object; phoneTypeRenderer?: (...args: any[]) => any; phoneSourceNameRenderer?: (...args: any[]) => any; callQueueName?: string; callerIdName?: string; }; const CallInfo: React.FC = (props) => { let avatar; if (props.avatarUrl) { avatar = ; } else { // @ts-expect-error TS(2322): Type 'null' is not assignable to type 'string | un... Remove this comment to see the full error message avatar = ; } return (
{avatar}
{props.callQueueName}
{props.formatPhone(props.phoneNumber)}
); }; CallInfo.defaultProps = { brand: 'RingCentral', showContactDisplayPlaceholder: true, callerIdName: undefined, }; export default CallInfo;