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

24 lines
754 B
JavaScript
Raw Normal View History

2017-09-17 22:33:52 +02:00
import React from "react";
import { connect } from "react-redux";
import {
makeSelectClaimForUri,
makeSelectContentTypeForUri,
makeSelectMetadataForUri,
} from "selectors/claims";
import FileDetails from "./view";
import { doOpenFileInFolder } from "actions/file_info";
import { makeSelectFileInfoForUri } from "selectors/file_info";
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)),
});
export default connect(select, perform)(FileDetails);