spee.ch/react/components/PublishTool.jsx

30 lines
761 B
React
Raw Normal View History

import React from 'react';
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-06 03:26:57 +01:00
class PublishTool extends React.Component {
constructor (props) {
super(props);
}
render () {
return (
2018-01-04 21:04:23 +01:00
<div className="row row--tall flex-container--column">
{ !this.props.file && <PreviewDropzone /> }
2018-01-10 03:25:38 +01:00
{ this.props.file && <PublishForm /> }
{ this.props.publishStatus && <PublishStatus /> }
</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);