spee.ch/client/build/containers/AssetDisplay/index.js

43 lines
1 KiB
JavaScript
Raw Normal View History

2018-05-23 04:06:37 +02:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _view = _interopRequireDefault(require("./view"));
var _show = require("../../actions/show");
var _show2 = require("../../selectors/show");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var mapStateToProps = function mapStateToProps(_ref) {
var show = _ref.show;
// select error and status
var error = show.displayAsset.error;
var status = show.displayAsset.status; // select asset
var asset = (0, _show2.selectAsset)(show); // return props
return {
error: error,
status: status,
asset: asset
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
onFileRequest: function onFileRequest(name, claimId) {
dispatch((0, _show.fileRequested)(name, claimId));
}
};
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_view.default);
exports.default = _default;