mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-03 10:07:55 +01:00
Settings: Render emoji in current user name (#1296)
This commit is contained in:
parent
338836a1c2
commit
65b5284e22
@ -7,6 +7,7 @@ import { ApiUser } from '../../../api/types';
|
||||
import { selectUser } from '../../../modules/selectors';
|
||||
import { getUserFullName } from '../../../modules/helpers';
|
||||
import { formatPhoneNumberWithCode } from '../../../util/phoneNumber';
|
||||
import renderText from '../../common/helpers/renderText';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
import useHistoryBack from '../../../hooks/useHistoryBack';
|
||||
|
||||
@ -30,6 +31,7 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
|
||||
currentUser,
|
||||
}) => {
|
||||
const lang = useLang();
|
||||
const fullName = getUserFullName(currentUser);
|
||||
|
||||
useHistoryBack(isActive, onReset, onScreenSelect, SettingsScreens.Main);
|
||||
|
||||
@ -39,7 +41,7 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
|
||||
{currentUser && (
|
||||
<div className="settings-current-user">
|
||||
<Avatar user={currentUser} size="jumbo" />
|
||||
<p className="name">{getUserFullName(currentUser)}</p>
|
||||
<p className="name">{fullName && renderText(fullName)}</p>
|
||||
<p className="phone">{formatPhoneNumberWithCode(currentUser.phoneNumber)}</p>
|
||||
</div>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user