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

View file

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