2020-03-25 04:15:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectContentTypeForUri,
|
|
|
|
makeSelectMetadataForUri,
|
2021-11-10 03:30:03 +01:00
|
|
|
selectClaimIsMineForUri,
|
2021-10-17 10:36:14 +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),
|
2021-11-10 03:30:03 +01:00
|
|
|
claimIsMine: selectClaimIsMineForUri(state, props.uri),
|
2020-03-25 04:15:05 +01:00
|
|
|
});
|
|
|
|
|
2021-10-17 10:36:14 +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);
|