import classNames from 'classnames'; import React from 'react'; import { useAppSelector } from 'soapbox/hooks'; import SensitiveButton from '../components/sensitive-button'; import UploadProgress from '../components/upload-progress'; import UploadContainer from '../containers/upload_container'; import type { Attachment as AttachmentEntity } from 'soapbox/types/entities'; const UploadForm = () => { const mediaIds = useAppSelector((state) => state.compose.get('media_attachments').map((item: AttachmentEntity) => item.get('id'))); const classes = classNames('compose-form__uploads-wrapper', { 'contains-media': mediaIds.size !== 0, }); return (
{mediaIds.map((id: string) => ( ))}
{!mediaIds.isEmpty() && }
); }; export default UploadForm;