call status in message preview was isolated in a class and made prettier

This commit is contained in:
or-else
2022-05-28 18:36:54 -07:00
parent 43e3395350
commit fec6a5bfa6
8 changed files with 90 additions and 28 deletions
+18
View File
@@ -0,0 +1,18 @@
// The counter of unread messages in the topic.
import React from 'react';
// Props:
// incoming: true | false.
// success: true | false.
export default class CallStatus extends React.PureComponent {
render() {
const icon2 = [['call_received', 'call_missed'],['call_made', 'call_missed_outgoing']]
[this.props.incoming ? 0 : 1][this.props.success ? 0 : 1] || 'question_mark';
return (
<div className="composed-material">
<i class="material-icons">call</i><i class="material-icons second">{icon2}</i>
</div>
);
}
};