import React from 'react'; import { Emojify } from './Emojify'; import { Localizer } from '../../types/Util'; interface Props { phoneNumber: string; name?: string; profileName?: string; i18n: Localizer; module?: string; } export class ContactName extends React.Component { public render() { const { phoneNumber, name, profileName, i18n, module } = this.props; const prefix = module ? module : 'module-contact-name'; const title = name ? name : phoneNumber; const shouldShowProfile = Boolean(profileName && !name); const profileElement = shouldShowProfile ? ( ~ ) : null; return ( {shouldShowProfile ? ' ' : null} {profileElement} ); } }