mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-04 18:50:31 +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 { selectUser } from '../../../modules/selectors';
|
||||||
import { getUserFullName } from '../../../modules/helpers';
|
import { getUserFullName } from '../../../modules/helpers';
|
||||||
import { formatPhoneNumberWithCode } from '../../../util/phoneNumber';
|
import { formatPhoneNumberWithCode } from '../../../util/phoneNumber';
|
||||||
|
import renderText from '../../common/helpers/renderText';
|
||||||
import useLang from '../../../hooks/useLang';
|
import useLang from '../../../hooks/useLang';
|
||||||
import useHistoryBack from '../../../hooks/useHistoryBack';
|
import useHistoryBack from '../../../hooks/useHistoryBack';
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
|
|||||||
currentUser,
|
currentUser,
|
||||||
}) => {
|
}) => {
|
||||||
const lang = useLang();
|
const lang = useLang();
|
||||||
|
const fullName = getUserFullName(currentUser);
|
||||||
|
|
||||||
useHistoryBack(isActive, onReset, onScreenSelect, SettingsScreens.Main);
|
useHistoryBack(isActive, onReset, onScreenSelect, SettingsScreens.Main);
|
||||||
|
|
||||||
@ -39,7 +41,7 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
|
|||||||
{currentUser && (
|
{currentUser && (
|
||||||
<div className="settings-current-user">
|
<div className="settings-current-user">
|
||||||
<Avatar user={currentUser} size="jumbo" />
|
<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>
|
<p className="phone">{formatPhoneNumberWithCode(currentUser.phoneNumber)}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user