import classNames from 'clsx'; import React from 'react'; import { useCompose } from 'soapbox/hooks'; import Upload from './upload'; import UploadProgress from './upload-progress'; import type { Attachment as AttachmentEntity } from 'soapbox/types/entities'; interface IUploadForm { composeId: string, } const UploadForm: React.FC = ({ composeId }) => { const mediaIds = useCompose(composeId).media_attachments.map((item: AttachmentEntity) => item.id); const classes = classNames('compose-form__uploads-wrapper', { 'contains-media': mediaIds.size !== 0, }); return (
{mediaIds.map((id: string) => ( ))}
); }; export default UploadForm;