spee.ch/client/build/containers/Dropzone/index.js
2018-05-22 19:06:37 -07:00

39 lines
No EOL
1,011 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _publish = require("../../actions/publish");
var _view = _interopRequireDefault(require("./view"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var publish = _ref.publish;
return {
file: publish.file,
thumbnail: publish.thumbnail,
fileError: publish.error.file
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
selectFile: function selectFile(file) {
dispatch((0, _publish.selectFile)(file));
},
setFileError: function setFileError(value) {
dispatch((0, _publish.clearFile)());
dispatch((0, _publish.updateError)('file', value));
}
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;