2020-03-25 04:15:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectContentTypeForUri,
|
|
|
|
makeSelectMetadataForUri,
|
|
|
|
makeSelectClaimIsMine,
|
2021-10-08 05:47:39 +02:00
|
|
|
} from 'redux/selectors/claims';
|
|
|
|
import { makeSelectPendingAmountByUri } from 'redux/selectors/wallet';
|
|
|
|
import { makeSelectFileInfoForUri } from 'redux/selectors/file_info';
|
2020-06-15 22:33:03 +02:00
|
|
|
import { selectUser } from 'redux/selectors/user';
|
2020-03-25 04:15:05 +01:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
|
|
|
|
|
|
|
import FileValues from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
contentType: makeSelectContentTypeForUri(props.uri)(state),
|
|
|
|
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
|
|
|
metadata: makeSelectMetadataForUri(props.uri)(state),
|
|
|
|
user: selectUser(state),
|
|
|
|
pendingAmount: makeSelectPendingAmountByUri(props.uri)(state),
|
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
|
|
|
});
|
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
const perform = (dispatch) => ({
|
2020-03-25 04:15:05 +01:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(FileValues);
|