// The counter of unread messages in the topic. import React from 'react'; import { FormattedMessage } from 'react-intl'; import { secondsToTime } from '../lib/strformat.js'; // Props: // incoming: true | false. // success: true | false. export default class CallStatus extends React.PureComponent { render() { const isCallDropped = ['declined', 'disconnected', 'missed'].includes(this.props.callState); const icon2 = this.props.incoming ? (isCallDropped ? 'call_missed' : 'call_received') : (isCallDropped ? 'call_missed_outgoing' : 'call_made'); let duration; if (isCallDropped) { switch (this.props.callState) { case 'declined': duration = ; break; case 'missed': duration = this.props.incoming ? : ; break; default: duration = ; break; } } else if (['accepted', 'started'].includes(this.props.callState) && !this.props.duration) { duration = } else { duration = {secondsToTime(this.props.duration / 1000)}; } return ( <>
call{icon2}
{duration} ); } };