spee.ch/react/components/AssetTitle/index.js

20 lines
423 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import View from './view';
const mapStateToProps = ({ show }) => {
// select title
const request = show.requestList[show.request.id];
2018-02-14 21:09:57 +01:00
const assetKey = request.key;
2018-02-13 03:50:19 +01:00
const asset = show.assetList[assetKey];
2018-02-13 05:01:02 +01:00
let title;
2018-02-13 03:50:19 +01:00
if (asset) {
2018-02-13 05:01:02 +01:00
title = asset.claimData.title;
};
// return props
return {
title,
};
};
export default connect(mapStateToProps, null)(View);