spee.ch/react/containers/PublishTool.jsx
2018-01-11 11:41:12 -08:00

29 lines
766 B
JavaScript

import React from 'react';
import PreviewDropzone from './Dropzone.jsx';
import PublishForm from './PublishForm.jsx';
import PublishStatus from '../components/PublishStatus.jsx';
import {connect} from 'react-redux';
class PublishTool extends React.Component {
constructor (props) {
super(props);
}
render () {
return (
<div className="row row--tall flex-container--column">
{ !this.props.file && <PreviewDropzone /> }
{ this.props.file && <PublishForm /> }
{ this.props.publishStatus && <PublishStatus /> }
</div>
);
}
};
const mapStateToProps = state => {
return {
file : state.file,
publishStatus: state.publishStatus,
};
};
export default connect(mapStateToProps, null)(PublishTool);