Improve a few strings, highlight back button on focus, proper key value
This commit is contained in:
parent
65ddf0a9e8
commit
e2454ef7c5
7 changed files with 191 additions and 98 deletions
|
@ -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} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue