2018-01-03 02:12:57 +01:00
|
|
|
import React from 'react';
|
2018-01-18 00:00:03 +01:00
|
|
|
import Dropzone from 'containers/Dropzone';
|
2018-03-02 02:16:04 +01:00
|
|
|
import PublishDetails from 'containers/PublishDetails';
|
|
|
|
import PublishStatus from 'containers/PublishStatus';
|
2018-03-13 18:08:15 +01:00
|
|
|
import PublishDisabledMessage from 'containers/PublishDisabledMessage';
|
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
|
|
|
render () {
|
2018-03-12 21:48:12 +01:00
|
|
|
if (this.props.disabled) {
|
2018-03-13 18:08:15 +01:00
|
|
|
console.log('publish is disabled');
|
2018-03-12 21:48:12 +01:00
|
|
|
return (
|
2018-03-13 18:08:15 +01:00
|
|
|
<PublishDisabledMessage />
|
2018-03-12 21:48:12 +01:00
|
|
|
);
|
2018-03-13 18:08:15 +01:00
|
|
|
} else {
|
|
|
|
console.log('publish is not disabled');
|
|
|
|
if (this.props.file) {
|
|
|
|
if (this.props.status) {
|
|
|
|
return (
|
|
|
|
<PublishStatus />
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return <PublishDetails />;
|
|
|
|
}
|
2018-01-12 00:37:32 +01:00
|
|
|
}
|
2018-03-13 18:08:15 +01:00
|
|
|
return <Dropzone />;
|
2018-01-12 00:37:32 +01:00
|
|
|
}
|
2018-01-03 02:12:57 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-01-17 19:49:57 +01:00
|
|
|
export default PublishTool;
|