2016-11-14 05:08:52 +11:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2017-09-28 23:31:31 +10:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2023-05-24 01:15:17 +10:00
|
|
|
|
|
|
|
import UploadContainer from '../containers/upload_container';
|
|
|
|
import UploadProgressContainer from '../containers/upload_progress_container';
|
2016-11-19 01:36:16 +11:00
|
|
|
|
2017-09-28 23:31:31 +10:00
|
|
|
export default class UploadForm extends ImmutablePureComponent {
|
2016-11-14 05:08:52 +11:00
|
|
|
|
2017-05-12 22:44:10 +10:00
|
|
|
static propTypes = {
|
2017-09-28 23:31:31 +10:00
|
|
|
mediaIds: ImmutablePropTypes.list.isRequired,
|
2017-05-12 22:44:10 +10:00
|
|
|
};
|
|
|
|
|
2016-11-14 05:08:52 +11:00
|
|
|
render () {
|
2017-09-28 23:31:31 +10:00
|
|
|
const { mediaIds } = this.props;
|
2016-11-14 05:08:52 +11:00
|
|
|
|
|
|
|
return (
|
2024-01-26 02:41:31 +11:00
|
|
|
<>
|
2022-10-30 05:05:53 +11:00
|
|
|
<UploadProgressContainer />
|
2017-09-28 23:31:31 +10:00
|
|
|
|
2024-01-26 02:41:31 +11:00
|
|
|
{mediaIds.size > 0 && (
|
|
|
|
<div className='compose-form__uploads'>
|
|
|
|
{mediaIds.map(id => (
|
|
|
|
<UploadContainer id={id} key={id} />
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</>
|
2016-11-14 05:08:52 +11:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-22 04:05:35 +10:00
|
|
|
}
|