|
|
|
@ -10,20 +10,27 @@ interface Props {
|
|
|
|
|
profileName?: string;
|
|
|
|
|
i18n: LocalizerType;
|
|
|
|
|
module?: string;
|
|
|
|
|
boldProfileName?: Boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class ContactName extends React.Component<Props> {
|
|
|
|
|
public render() {
|
|
|
|
|
const { phoneNumber, name, profileName, i18n, module } = this.props;
|
|
|
|
|
const { phoneNumber, name, profileName, i18n, module, boldProfileName } = this.props;
|
|
|
|
|
const prefix = module ? module : 'module-contact-name';
|
|
|
|
|
|
|
|
|
|
const title = name ? name : phoneNumber;
|
|
|
|
|
const shouldShowProfile = Boolean(profileName && !name);
|
|
|
|
|
const profileElement = shouldShowProfile ? (
|
|
|
|
|
<span className={`${prefix}__profile-name`}>
|
|
|
|
|
<b><Emojify text={profileName || ''} i18n={i18n} /></b>
|
|
|
|
|
</span>
|
|
|
|
|
) : null;
|
|
|
|
|
const profileElement = shouldShowProfile ?
|
|
|
|
|
(boldProfileName ? (
|
|
|
|
|
<span className={`${prefix}__profile-name`}>
|
|
|
|
|
<b><Emojify text={profileName || ''} i18n={i18n} /></b>
|
|
|
|
|
</span>
|
|
|
|
|
) : (
|
|
|
|
|
<span className={`${prefix}__profile-name`}>
|
|
|
|
|
<Emojify text={profileName || ''} i18n={i18n} />
|
|
|
|
|
</span>
|
|
|
|
|
))
|
|
|
|
|
: null;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<span className={prefix} dir="auto">
|
|
|
|
|