Improve a few strings, highlight back button on focus, proper key value

This commit is contained in:
Scott Nonnenberg 2021-09-17 13:57:54 -07:00 committed by GitHub
parent 65ddf0a9e8
commit e2454ef7c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 191 additions and 98 deletions

View file

@ -10,23 +10,18 @@ import { Intl } from '../Intl';
import { LocalizerType } from '../../types/Util';
import { missingCaseError } from '../../util/missingCaseError';
type Contact = {
phoneNumber?: string;
title: string;
isMe?: boolean;
};
import { ConversationType } from '../../state/ducks/conversations';
export type ChangeType = 'add' | 'remove' | 'name' | 'avatar' | 'general';
type Change = {
type: ChangeType;
newName?: string;
contacts?: Array<Contact>;
contacts?: Array<ConversationType>;
};
export type PropsData = {
from: Contact;
from: ConversationType;
changes: Array<Change>;
};
@ -39,7 +34,7 @@ export type Props = PropsData & PropsHousekeeping;
export class GroupNotification extends React.Component<Props> {
public renderChange(
change: Change,
from: Contact
from: ConversationType
): JSX.Element | string | null | undefined {
const { contacts, type, newName } = change;
const { i18n } = this.props;
@ -52,7 +47,7 @@ export class GroupNotification extends React.Component<Props> {
return (
<span
key={`external-${contact.phoneNumber}`}
key={`external-${contact.id}`}
className="module-group-notification__contact"
>
<ContactName title={contact.title} />