Show badges in contact spoofing dialog
This commit is contained in:
parent
599c7afe8b
commit
a7ca634e87
4 changed files with 24 additions and 3 deletions
|
@ -5,7 +5,8 @@ import type { FunctionComponent, ReactNode } from 'react';
|
|||
import React from 'react';
|
||||
|
||||
import type { ConversationType } from '../../state/ducks/conversations';
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import type { LocalizerType, ThemeType } from '../../types/Util';
|
||||
import type { PreferredBadgeSelectorType } from '../../state/selectors/badges';
|
||||
import { assert } from '../../util/assert';
|
||||
|
||||
import { Avatar, AvatarSize } from '../Avatar';
|
||||
|
@ -15,12 +16,14 @@ import { SharedGroupNames } from '../SharedGroupNames';
|
|||
type PropsType = {
|
||||
children?: ReactNode;
|
||||
conversation: ConversationType;
|
||||
getPreferredBadge: PreferredBadgeSelectorType;
|
||||
i18n: LocalizerType;
|
||||
onClick?: () => void;
|
||||
theme: ThemeType;
|
||||
};
|
||||
|
||||
export const ContactSpoofingReviewDialogPerson: FunctionComponent<PropsType> =
|
||||
({ children, conversation, i18n, onClick }) => {
|
||||
({ children, conversation, getPreferredBadge, i18n, onClick, theme }) => {
|
||||
assert(
|
||||
conversation.type === 'direct',
|
||||
'<ContactSpoofingReviewDialogPerson> expected a direct conversation'
|
||||
|
@ -30,10 +33,12 @@ export const ContactSpoofingReviewDialogPerson: FunctionComponent<PropsType> =
|
|||
<>
|
||||
<Avatar
|
||||
{...conversation}
|
||||
badge={getPreferredBadge(conversation.badges)}
|
||||
conversationType={conversation.type}
|
||||
size={AvatarSize.FIFTY_TWO}
|
||||
className="module-ContactSpoofingReviewDialogPerson__avatar"
|
||||
i18n={i18n}
|
||||
theme={theme}
|
||||
/>
|
||||
<div className="module-ContactSpoofingReviewDialogPerson__info">
|
||||
<ContactName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue