lbry-desktop/ui/component/fileDetails/index.js

21 lines
815 B
JavaScript
Raw Permalink Normal View History

import { connect } from 'react-redux';
import { makeSelectClaimForUri, makeSelectContentTypeForUri, makeSelectMetadataForUri } from 'redux/selectors/claims';
import { makeSelectFileInfoForUri } from 'redux/selectors/file_info';
import { selectUser } from 'redux/selectors/user';
2018-04-18 06:03:01 +02:00
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),
2018-11-07 23:44:38 +01:00
user: selectUser(state),
2017-09-17 22:33:52 +02:00
});
const perform = (dispatch) => ({
openFolder: (path) => dispatch(doOpenFileInFolder(path)),
});
export default connect(select, perform)(FileDetails);