call status in message preview was isolated in a class and made prettier
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user