Add badges to avatars in group dialogs

This commit is contained in:
Evan Hahn 2021-11-20 09:41:21 -06:00 committed by GitHub
parent 7bb37dc63b
commit e490d91cc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 121 additions and 39 deletions

View file

@ -4,8 +4,9 @@
import type { FunctionComponent, ReactNode } from 'react';
import React from 'react';
import type { LocalizerType } from '../types/Util';
import type { LocalizerType, ThemeType } from '../types/Util';
import type { ConversationType } from '../state/ducks/conversations';
import type { PreferredBadgeSelectorType } from '../state/selectors/badges';
import { Intl } from './Intl';
import { ContactName } from './conversation/ContactName';
import { GroupDialog } from './GroupDialog';
@ -13,12 +14,14 @@ import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser';
type PropsType = {
contacts: Array<ConversationType>;
getPreferredBadge: PreferredBadgeSelectorType;
i18n: LocalizerType;
onClose: () => void;
theme: ThemeType;
};
export const NewlyCreatedGroupInvitedContactsDialog: FunctionComponent<PropsType> =
({ contacts, i18n, onClose }) => {
({ contacts, getPreferredBadge, i18n, onClose, theme }) => {
let title: string;
let body: ReactNode;
if (contacts.length === 1) {
@ -57,7 +60,12 @@ export const NewlyCreatedGroupInvitedContactsDialog: FunctionComponent<PropsType
'NewlyCreatedGroupInvitedContactsDialog--body--info-paragraph'
)}
</GroupDialog.Paragraph>
<GroupDialog.Contacts contacts={contacts} i18n={i18n} />
<GroupDialog.Contacts
contacts={contacts}
getPreferredBadge={getPreferredBadge}
i18n={i18n}
theme={theme}
/>
</>
);
}