lbry-desktop/src/renderer/component/fileDetails/index.js

26 lines
692 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2017-09-17 22:33:52 +02:00
import {
makeSelectClaimForUri,
makeSelectContentTypeForUri,
makeSelectMetadataForUri,
2018-04-18 06:03:01 +02:00
makeSelectFileInfoForUri,
} from 'lbry-redux';
import { doOpenFileInFolder } from 'redux/actions/file';
import FileDetails from './view';
2017-09-17 22:33:52 +02:00
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
contentType: makeSelectContentTypeForUri(props.uri)(state),
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
2017-09-17 22:33:52 +02:00
metadata: makeSelectMetadataForUri(props.uri)(state),
});
const perform = dispatch => ({
openFolder: path => dispatch(doOpenFileInFolder(path)),
});
2018-10-31 17:41:25 +01:00
export default connect(
select,
perform
)(FileDetails);