spee.ch/react/components/PublishTool.jsx
2018-01-09 18:25:38 -08:00

29 lines
761 B
JavaScript

import React from 'react';
import PublishDropzone from './PublishDropzone.jsx';
import PublishForm from './PublishForm.jsx';
import PublishStatus from './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 && <PublishDropzone /> }
{ 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);