2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
2021-08-05 23:34:49 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { ConversationType } from '../../state/ducks/conversations';
|
|
|
|
import type { LocalizerType } from '../../types/Util';
|
2021-08-05 23:34:49 +00:00
|
|
|
import { Intl } from '../Intl';
|
|
|
|
|
2021-09-07 19:55:03 +00:00
|
|
|
import { SystemMessage } from './SystemMessage';
|
2022-01-26 23:05:26 +00:00
|
|
|
import { MessageTimestamp } from './MessageTimestamp';
|
2021-08-05 23:34:49 +00:00
|
|
|
import { Emojify } from './Emojify';
|
|
|
|
|
|
|
|
export type PropsData = {
|
|
|
|
sender: ConversationType;
|
|
|
|
timestamp: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type PropsHousekeeping = {
|
|
|
|
i18n: LocalizerType;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Props = PropsData & PropsHousekeeping;
|
|
|
|
|
2022-11-18 00:45:19 +00:00
|
|
|
export function ChangeNumberNotification(props: Props): JSX.Element {
|
2022-03-08 19:11:11 +00:00
|
|
|
const { i18n, sender, timestamp } = props;
|
2021-08-05 23:34:49 +00:00
|
|
|
|
|
|
|
return (
|
2021-09-07 19:55:03 +00:00
|
|
|
<SystemMessage
|
|
|
|
contents={
|
|
|
|
<>
|
|
|
|
<Intl
|
|
|
|
id="ChangeNumber--notification"
|
|
|
|
components={{
|
2022-11-10 04:59:36 +00:00
|
|
|
sender: <Emojify text={sender.title || sender.firstName || ''} />,
|
2021-09-07 19:55:03 +00:00
|
|
|
}}
|
|
|
|
i18n={i18n}
|
|
|
|
/>
|
|
|
|
·
|
2022-03-08 19:11:11 +00:00
|
|
|
<MessageTimestamp i18n={i18n} timestamp={timestamp} />
|
2021-09-07 19:55:03 +00:00
|
|
|
</>
|
|
|
|
}
|
|
|
|
icon="phone"
|
|
|
|
/>
|
2021-08-05 23:34:49 +00:00
|
|
|
);
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|