The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/message/content/Attachments.tsx

22 lines
570 B

import type { MessageAttachmentBase } from '@rocket.chat/core-typings';
import type { ReactElement } from 'react';
import React from 'react';
import AttachmentsItem from './attachments/AttachmentsItem';
type AttachmentsProps = {
attachments: MessageAttachmentBase[];
collapsed?: boolean;
};
const Attachments = ({ attachments, collapsed }: AttachmentsProps): ReactElement => {
return (
<>
{attachments?.map((attachment, index) => (
<AttachmentsItem key={index} attachment={{ ...attachment, collapsed }} />
))}
</>
);
};
export default Attachments;