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.
		
		
		
		
		
			
		
			
				
	
	
		
			28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			TypeScript
		
	
import React from 'react';
 | 
						|
import { PropsForDataExtractionNotification } from '../../../../models/messageType';
 | 
						|
import { SignalService } from '../../../../protobuf';
 | 
						|
import { ExpirableReadableMessage } from './ExpirableReadableMessage';
 | 
						|
import { NotificationBubble } from './notification-bubble/NotificationBubble';
 | 
						|
 | 
						|
export const DataExtractionNotification = (props: PropsForDataExtractionNotification) => {
 | 
						|
  const { name, type, source, messageId } = props;
 | 
						|
 | 
						|
  let contentText: string;
 | 
						|
  if (type === SignalService.DataExtractionNotification.Type.MEDIA_SAVED) {
 | 
						|
    contentText = window.i18n('savedTheFile', [name || source]);
 | 
						|
  } else {
 | 
						|
    contentText = window.i18n('tookAScreenshot', [name || source]);
 | 
						|
  }
 | 
						|
 | 
						|
  return (
 | 
						|
    <ExpirableReadableMessage
 | 
						|
      messageId={messageId}
 | 
						|
      dataTestId="data-extraction-notification"
 | 
						|
      key={`readable-message-${messageId}`}
 | 
						|
      isControlMessage={true}
 | 
						|
    >
 | 
						|
      <NotificationBubble notificationText={contentText} iconType="save" />
 | 
						|
    </ExpirableReadableMessage>
 | 
						|
  );
 | 
						|
};
 |