diff --git a/src/sharing/ShareToPm.js b/src/sharing/ShareToPm.js index 45c39469894..6eb1edd4314 100644 --- a/src/sharing/ShareToPm.js +++ b/src/sharing/ShareToPm.js @@ -136,7 +136,7 @@ class ShareToPm extends React.Component { } const preview = []; selectedRecipients.forEach(userId => { - preview.push( {}} key={userId} />); + preview.push(); }); return preview; }; diff --git a/src/users/UserItem.js b/src/users/UserItem.js index 0e99471a534..e1897d11a75 100644 --- a/src/users/UserItem.js +++ b/src/users/UserItem.js @@ -33,7 +33,7 @@ type Props = $ReadOnly<{| isSelected: boolean, showEmail: boolean, unreadCount?: number, - onPress: UserT => void, + onPress?: UserT => void, |}>; /** @@ -56,21 +56,22 @@ export class UserItemRaw< handlePress = () => { const { user, onPress } = this.props; - // TODO cut this `user.email` condition -- it should never trigger, and - // looks like a fudge for the possibility of data coming from - // the late NULL_USER - if (user.email && onPress) { + if (onPress) { onPress(user); } }; render() { - const { user, isSelected, unreadCount, showEmail } = this.props; + const { user, isSelected, onPress, unreadCount, showEmail } = this.props; return ( - + - +