Added tip related code in different file.

This commit is contained in:
hackrush 2017-07-27 22:25:51 +05:30
parent f54f8a4e10
commit a74d61d685
3 changed files with 4 additions and 11 deletions

View file

@ -6,11 +6,6 @@ import {
makeSelectDownloadingForUri,
makeSelectLoadingForUri,
} from "selectors/file_info";
import {
doSendDraftTransaction,
doSetDraftTransactionAmount,
doSetDraftTransactionAddress,
} from "actions/wallet";
import { makeSelectIsAvailableForUri } from "selectors/availability";
import { selectCurrentModal } from "selectors/app";
import { makeSelectCostInfoForUri } from "selectors/cost_info";
@ -53,9 +48,6 @@ const perform = dispatch => ({
startDownload: uri => dispatch(doPurchaseUri(uri, "affirmPurchase")),
loadVideo: uri => dispatch(doLoadVideo(uri)),
restartDownload: (uri, outpoint) => dispatch(doStartDownload(uri, outpoint)),
sendToAddress: () => dispatch(doSendDraftTransaction()),
setAmount: amount => dispatch(doSetDraftTransactionAmount(amount)),
setAddress: address => dispatch(doSetDraftTransactionAddress(address)),
});
export default connect(makeSelect, perform)(FileActions);

View file

@ -1,7 +1,7 @@
import React from "react";
import { Icon, BusyMessage } from "component/common";
import FilePrice from "component/filePrice";
import { TipLink } from "component/tipLink";
import TipLink from "component/tipLink";
import { Modal } from "component/modal";
import Link from "component/link";
import { ToolTip } from "component/tooltip";

View file

@ -45,6 +45,7 @@ class TipLink extends React.PureComponent {
}
render() {
const { modal, closeModal } = this.props;
const { showTipBox } = this.state;
let tipLink = (
@ -83,7 +84,7 @@ class TipLink extends React.PureComponent {
);
return (
<section className="file-actions">
<div className="menu-container">
{showTipBox ? tipBox : tipLink}
{modal == "insufficientBalance" &&
<Modal
@ -115,7 +116,7 @@ class TipLink extends React.PureComponent {
>
{__("Something went wrong")}:
</Modal>}
</section>
</div>
);
}
}