2020-03-24 23:15:05 -04:00
|
|
|
import { connect } from 'react-redux';
|
2021-11-11 12:48:10 +08:00
|
|
|
import { selectClaimForUri, makeSelectMetadataForUri, selectClaimIsMine } from 'redux/selectors/claims';
|
2021-10-17 16:36:14 +08:00
|
|
|
import { makeSelectPendingAmountByUri } from 'redux/selectors/wallet';
|
2020-10-23 15:55:19 -04:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2020-06-15 16:33:03 -04:00
|
|
|
import { selectUser } from 'redux/selectors/user';
|
2020-03-24 23:15:05 -04:00
|
|
|
import FileDescription from './view';
|
|
|
|
|
2021-11-11 12:48:10 +08:00
|
|
|
const select = (state, props) => {
|
|
|
|
const claim = selectClaimForUri(state, props.uri);
|
|
|
|
|
|
|
|
return {
|
|
|
|
claim,
|
|
|
|
claimIsMine: selectClaimIsMine(state, claim),
|
|
|
|
metadata: makeSelectMetadataForUri(props.uri)(state),
|
|
|
|
user: selectUser(state),
|
|
|
|
pendingAmount: makeSelectPendingAmountByUri(props.uri)(state),
|
|
|
|
};
|
|
|
|
};
|
2020-03-24 23:15:05 -04:00
|
|
|
|
2020-10-23 15:55:19 -04:00
|
|
|
export default connect(select, {
|
|
|
|
doOpenModal,
|
|
|
|
})(FileDescription);
|