ProfileChangeNotification: Ensure emoji are rendered properly

This commit is contained in:
Scott Nonnenberg 2020-09-08 12:56:10 -07:00
parent 9d64b6e8d7
commit 91cf075697
2 changed files with 9 additions and 8 deletions

View file

@ -19,14 +19,14 @@ storiesOf('Components/Conversation/ProfileChangeNotification', module)
changedContact={{
id: 'some-guid',
type: 'direct',
title: 'John',
name: 'John',
title: 'Mr. Fire 🔥',
name: 'Mr. Fire 🔥',
lastUpdated: Date.now(),
}}
change={{
type: 'name',
oldName: 'John Old',
newName: 'John New',
oldName: 'Mr. Fire 🔥 Old',
newName: 'Mr. Fire 🔥 New',
}}
/>
);
@ -38,13 +38,13 @@ storiesOf('Components/Conversation/ProfileChangeNotification', module)
changedContact={{
id: 'some-guid',
type: 'direct',
title: 'John',
title: 'Mr. Fire 🔥',
lastUpdated: Date.now(),
}}
change={{
type: 'name',
oldName: 'John Old',
newName: 'John New',
oldName: 'Mr. Fire 🔥 Old',
newName: 'Mr. Fire 🔥 New',
}}
/>
);

View file

@ -2,6 +2,7 @@ import React from 'react';
import { LocalizerType } from '../../types/Util';
import { ConversationType } from '../../state/ducks/conversations';
import { Emojify } from './Emojify';
import {
getStringForProfileChange,
ProfileNameChangeType,
@ -20,7 +21,7 @@ export function ProfileChangeNotification(props: PropsType): JSX.Element {
return (
<div className="module-profile-change-notification">
<div className="module-profile-change-notification--icon" />
{message}
<Emojify text={message} />
</div>
);
}