🤦♂️
This commit is contained in:
parent
5af0cfc6c2
commit
e0c90f866c
2 changed files with 6 additions and 3 deletions
|
@ -50,7 +50,7 @@ function WalletSendTip(props: Props) {
|
||||||
|
|
||||||
function sendSupportOrConfirm(instantTipMaxAmount = null) {
|
function sendSupportOrConfirm(instantTipMaxAmount = null) {
|
||||||
if (!isSupport && (!instantTipMaxAmount || !instantTipEnabled || tipAmount > instantTipMaxAmount)) {
|
if (!isSupport && (!instantTipMaxAmount || !instantTipEnabled || tipAmount > instantTipMaxAmount)) {
|
||||||
const modalProps = { tipAmount, claimId, title, isSupport };
|
const modalProps = { uri, tipAmount, claimId, title, isSupport };
|
||||||
openModal(MODALS.CONFIRM_SEND_TIP, modalProps);
|
openModal(MODALS.CONFIRM_SEND_TIP, modalProps);
|
||||||
} else {
|
} else {
|
||||||
sendSupport(tipAmount, claimId, isSupport);
|
sendSupport(tipAmount, claimId, isSupport);
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { parseURI } from 'lbry-redux';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { Form } from 'component/common/form';
|
import { Form } from 'component/common/form';
|
||||||
import { Modal } from 'modal/modal';
|
import { Modal } from 'modal/modal';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
uri: string,
|
||||||
claimId: string,
|
claimId: string,
|
||||||
title: string,
|
title: string,
|
||||||
tipAmount: number,
|
tipAmount: number,
|
||||||
|
@ -22,8 +24,9 @@ class ModalConfirmSendTip extends React.PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { tipAmount = 5.5, title = 'This is a random title name', isSupport, closeModal } = this.props;
|
const { tipAmount = 5.5, title, isSupport, closeModal, uri } = this.props;
|
||||||
const cardTitle = __(isSupport ? 'Confirm Support' : 'Confirm Tip');
|
const cardTitle = __(isSupport ? 'Confirm Support' : 'Confirm Tip');
|
||||||
|
const { channelName } = parseURI(uri);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen type="card" onAborted={closeModal} contentLabel={cardTitle}>
|
<Modal isOpen type="card" onAborted={closeModal} contentLabel={cardTitle}>
|
||||||
|
@ -38,7 +41,7 @@ class ModalConfirmSendTip extends React.PureComponent<Props> {
|
||||||
</div>
|
</div>
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<label>{__('To: ')}</label>
|
<label>{__('To: ')}</label>
|
||||||
<blockquote>{title}</blockquote>
|
<blockquote>{title || channelName}</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue