2017-05-03 03:04:16 +03:00
|
|
|
import React from 'react';
|
2016-11-13 20:08:52 +02:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2017-03-24 04:50:30 +02:00
|
|
|
import UploadProgressContainer from '../containers/upload_progress_container';
|
2017-09-28 16:31:31 +03:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
|
|
import UploadContainer from '../containers/upload_container';
|
2016-11-18 16:36:16 +02:00
|
|
|
|
2017-09-28 16:31:31 +03:00
|
|
|
export default class UploadForm extends ImmutablePureComponent {
|
2016-11-13 20:08:52 +02:00
|
|
|
|
2017-05-12 15:44:10 +03:00
|
|
|
static propTypes = {
|
2017-09-28 16:31:31 +03:00
|
|
|
mediaIds: ImmutablePropTypes.list.isRequired,
|
2017-05-12 15:44:10 +03:00
|
|
|
};
|
|
|
|
|
2016-11-13 20:08:52 +02:00
|
|
|
render () {
|
2017-09-28 16:31:31 +03:00
|
|
|
const { mediaIds } = this.props;
|
2016-11-13 20:08:52 +02:00
|
|
|
|
|
|
|
return (
|
2017-04-23 05:26:55 +03:00
|
|
|
<div className='compose-form__upload-wrapper'>
|
2017-03-24 04:50:30 +02:00
|
|
|
<UploadProgressContainer />
|
2017-09-28 16:31:31 +03:00
|
|
|
|
|
|
|
<div className='compose-form__uploads-wrapper'>
|
|
|
|
{mediaIds.map(id => (
|
|
|
|
<UploadContainer id={id} key={id} />
|
|
|
|
))}
|
|
|
|
</div>
|
2016-11-13 20:08:52 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-21 21:05:35 +03:00
|
|
|
}
|