lbry-desktop/ui/js/modal/modalRemoveFile/index.js
Jeremy Kauffman 5bec6accc2 mostly done
refactor modals and settings, clean-up CHANGELOG
2017-08-18 17:47:30 -04:00

27 lines
843 B
JavaScript

import React from "react";
import { connect } from "react-redux";
import { doCloseModal, doHistoryBack } from "actions/app";
import { doDeleteFileAndGoBack } from "actions/file_info";
import { makeSelectClaimForUriIsMine } from "selectors/claims";
import batchActions from "util/batchActions";
import ModalRemoveFile from "./view";
const makeSelect = () => {
const selectClaimForUriIsMine = makeSelectClaimForUriIsMine();
const select = (state, props) => ({
claimIsMine: selectClaimForUriIsMine(state, props),
});
return select;
};
const perform = dispatch => ({
closeModal: () => dispatch(doCloseModal()),
deleteFile: (fileInfo, deleteFromComputer, abandonClaim) => {
dispatch(doDeleteFileAndGoBack(fileInfo, deleteFromComputer, abandonClaim));
},
});
export default connect(makeSelect, perform)(ModalRemoveFile);