2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2017-09-17 16:33:52 -04:00
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectContentTypeForUri,
|
|
|
|
makeSelectMetadataForUri,
|
2018-04-18 00:03:01 -04:00
|
|
|
makeSelectFileInfoForUri,
|
|
|
|
} from 'lbry-redux';
|
2020-06-15 16:33:03 -04:00
|
|
|
import { selectUser } from 'redux/selectors/user';
|
2018-04-18 00:03:01 -04:00
|
|
|
import { doOpenFileInFolder } from 'redux/actions/file';
|
2017-12-21 18:08:54 -03:00
|
|
|
import FileDetails from './view';
|
2017-09-17 16:33:52 -04:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
contentType: makeSelectContentTypeForUri(props.uri)(state),
|
2017-09-20 08:47:08 -04:00
|
|
|
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
2017-09-17 16:33:52 -04:00
|
|
|
metadata: makeSelectMetadataForUri(props.uri)(state),
|
2018-11-07 17:44:38 -05:00
|
|
|
user: selectUser(state),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
2017-09-20 08:47:08 -04:00
|
|
|
const perform = dispatch => ({
|
|
|
|
openFolder: path => dispatch(doOpenFileInFolder(path)),
|
|
|
|
});
|
|
|
|
|
2020-06-15 16:33:03 -04:00
|
|
|
export default connect(select, perform)(FileDetails);
|