2020-03-25 04:15:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
2020-10-23 00:11:22 +02:00
|
|
|
import {
|
2021-12-31 18:52:26 +01:00
|
|
|
selectClaimForUri,
|
2020-10-23 00:11:22 +02:00
|
|
|
makeSelectMetadataForUri,
|
2021-12-31 18:52:26 +01:00
|
|
|
selectClaimIsMine,
|
2020-10-23 00:11:22 +02:00
|
|
|
makeSelectTagsForUri,
|
2021-10-08 05:47:39 +02:00
|
|
|
} from 'redux/selectors/claims';
|
|
|
|
import { makeSelectPendingAmountByUri } from 'redux/selectors/wallet';
|
2020-10-23 21:55:19 +02:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2020-03-25 04:15:05 +01:00
|
|
|
import FileDescription from './view';
|
|
|
|
|
2021-12-31 18:52:26 +01:00
|
|
|
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),
|
|
|
|
};
|
|
|
|
};
|
2020-03-25 04:15:05 +01:00
|
|
|
|
2020-10-23 21:55:19 +02:00
|
|
|
export default connect(select, {
|
|
|
|
doOpenModal,
|
|
|
|
})(FileDescription);
|