lbry-desktop/ui/component/fileDescription/index.js

27 lines
748 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2020-10-23 00:11:22 +02:00
import {
selectClaimForUri,
2020-10-23 00:11:22 +02:00
makeSelectMetadataForUri,
selectClaimIsMine,
2020-10-23 00:11:22 +02:00
makeSelectTagsForUri,
} from 'redux/selectors/claims';
import { makeSelectPendingAmountByUri } from 'redux/selectors/wallet';
import { doOpenModal } from 'redux/actions/app';
import FileDescription from './view';
const select = (state, props) => {
const claim = selectClaimForUri(state, props.uri);
return {
claim,
claimIsMine: selectClaimIsMine(state, claim),
metadata: makeSelectMetadataForUri(props.uri)(state),
pendingAmount: makeSelectPendingAmountByUri(props.uri)(state),
tags: makeSelectTagsForUri(props.uri)(state),
};
};
export default connect(select, {
doOpenModal,
})(FileDescription);