You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { PropsForDataExtractionNotification } from '../../../../models/messageType';
|
|
import { SignalService } from '../../../../protobuf';
|
|
import { ExpirableReadableMessage } from './ExpirableReadableMessage';
|
|
import { NotificationBubble } from './notification-bubble/NotificationBubble';
|
|
import { Localizer } from '../../../basic/Localizer';
|
|
|
|
export const DataExtractionNotification = (props: PropsForDataExtractionNotification) => {
|
|
const { name, type, source, messageId } = props;
|
|
|
|
return (
|
|
<ExpirableReadableMessage
|
|
messageId={messageId}
|
|
dataTestId="data-extraction-notification"
|
|
key={`readable-message-${messageId}`}
|
|
isControlMessage={true}
|
|
>
|
|
<NotificationBubble iconType="save">
|
|
<Localizer
|
|
token={
|
|
type === SignalService.DataExtractionNotification.Type.MEDIA_SAVED
|
|
? 'attachmentsMediaSaved'
|
|
: 'screenshotTaken'
|
|
}
|
|
args={{ name: name || source }}
|
|
/>
|
|
</NotificationBubble>
|
|
</ExpirableReadableMessage>
|
|
);
|
|
};
|