2018-01-03 02:12:57 +01:00
|
|
|
import React from 'react';
|
2018-01-11 01:30:17 +01:00
|
|
|
import PreviewDropzone from './PreviewDropzone.jsx';
|
2018-01-09 02:06:31 +01:00
|
|
|
import PublishForm from './PublishForm.jsx';
|
|
|
|
import PublishStatus from './PublishStatus.jsx';
|
|
|
|
import {connect} from 'react-redux';
|
2018-01-03 02:12:57 +01:00
|
|
|
|
2018-01-06 03:26:57 +01:00
|
|
|
class PublishTool extends React.Component {
|
2018-01-03 02:12:57 +01:00
|
|
|
constructor (props) {
|
|
|
|
super(props);
|
2018-01-05 20:09:32 +01:00
|
|
|
}
|
2018-01-03 02:12:57 +01:00
|
|
|
render () {
|
|
|
|
return (
|
2018-01-04 21:04:23 +01:00
|
|
|
<div className="row row--tall flex-container--column">
|
2018-01-11 01:30:17 +01:00
|
|
|
{ !this.props.file && <PreviewDropzone /> }
|
2018-01-10 03:25:38 +01:00
|
|
|
{ this.props.file && <PublishForm /> }
|
|
|
|
{ this.props.publishStatus && <PublishStatus /> }
|
2018-01-03 02:12:57 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-01-09 02:06:31 +01:00
|
|
|
const mapStateToProps = state => {
|
|
|
|
return {
|
2018-01-10 03:25:38 +01:00
|
|
|
file : state.file,
|
|
|
|
publishStatus: state.publishStatus,
|
2018-01-09 02:06:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, null)(PublishTool);
|