Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Airdrop/Airdrop.js
Show All 9 Lines | import { | ||||
InputAmountSingle, | InputAmountSingle, | ||||
} from 'components/Common/EnhancedInputs'; | } from 'components/Common/EnhancedInputs'; | ||||
import { CustomCollapseCtn } from 'components/Common/StyledCollapse'; | import { CustomCollapseCtn } from 'components/Common/StyledCollapse'; | ||||
import { Form, Alert, Input, Modal, Spin, Progress } from 'antd'; | import { Form, Alert, Input, Modal, Spin, Progress } from 'antd'; | ||||
const { TextArea } = Input; | const { TextArea } = Input; | ||||
import { Row, Col, Switch } from 'antd'; | import { Row, Col, Switch } from 'antd'; | ||||
import { SmartButton } from 'components/Common/PrimaryButton'; | import { SmartButton } from 'components/Common/PrimaryButton'; | ||||
import useBCH from 'hooks/useBCH'; | import useBCH from 'hooks/useBCH'; | ||||
import { | import { errorNotification } from 'components/Common/Notifications'; | ||||
errorNotification, | |||||
generalNotification, | |||||
} from 'components/Common/Notifications'; | |||||
import { currency } from 'components/Common/Ticker.js'; | import { currency } from 'components/Common/Ticker.js'; | ||||
import BalanceHeader from 'components/Common/BalanceHeader'; | import BalanceHeader from 'components/Common/BalanceHeader'; | ||||
import BalanceHeaderFiat from 'components/Common/BalanceHeaderFiat'; | import BalanceHeaderFiat from 'components/Common/BalanceHeaderFiat'; | ||||
import CopyToClipboard from 'components/Common/CopyToClipboard'; | |||||
import { | import { | ||||
getWalletState, | getWalletState, | ||||
convertEtokenToEcashAddr, | convertEtokenToEcashAddr, | ||||
fromSmallestDenomination, | fromSmallestDenomination, | ||||
convertToEcashPrefix, | convertToEcashPrefix, | ||||
convertEcashtoEtokenAddr, | convertEcashtoEtokenAddr, | ||||
} from 'utils/cashMethods'; | } from 'utils/cashMethods'; | ||||
import { | import { | ||||
Show All 12 Lines | |||||
import WalletLabel from 'components/Common/WalletLabel.js'; | import WalletLabel from 'components/Common/WalletLabel.js'; | ||||
import { Link } from 'react-router-dom'; | import { Link } from 'react-router-dom'; | ||||
const AirdropActions = styled.div` | const AirdropActions = styled.div` | ||||
text-align: center; | text-align: center; | ||||
width: 100%; | width: 100%; | ||||
padding: 10px; | padding: 10px; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
display: flex; | |||||
justify-content: center; | |||||
a { | a { | ||||
color: ${props => props.theme.contrast}; | color: ${props => props.theme.contrast}; | ||||
margin: 0; | margin: 0; | ||||
font-size: 11px; | font-size: 11px; | ||||
border: 1px solid ${props => props.theme.contrast}; | border: 1px solid ${props => props.theme.contrast}; | ||||
border-radius: 5px; | border-radius: 5px; | ||||
padding: 2px 10px; | padding: 2px 10px; | ||||
opacity: 0.6; | opacity: 0.6; | ||||
▲ Show 20 Lines • Show All 729 Lines • ▼ Show 20 Lines | return ( | ||||
}} | }} | ||||
disabled={ | disabled={ | ||||
!airdropRecipients | !airdropRecipients | ||||
} | } | ||||
> | > | ||||
Copy to Send screen | Copy to Send screen | ||||
</Link> | </Link> | ||||
| | ||||
<CopyToClipboard | |||||
data={airdropRecipients} | |||||
optionalOnCopyNotification={{ | |||||
title: 'Copied', | |||||
msg: 'Airdrop recipients copied to clipboard', | |||||
}} | |||||
> | |||||
<Link | <Link | ||||
type="text" | type="text" | ||||
disabled={ | disabled={ | ||||
!airdropRecipients | !airdropRecipients | ||||
} | } | ||||
to={'#'} | to={'#'} | ||||
onClick={() => { | |||||
navigator.clipboard.writeText( | |||||
airdropRecipients, | |||||
); | |||||
generalNotification( | |||||
'Airdrop recipients copied to clipboard', | |||||
'Copied', | |||||
); | |||||
}} | |||||
> | > | ||||
Copy to Clipboard | Copy to Clipboard | ||||
</Link> | </Link> | ||||
</CopyToClipboard> | |||||
</AirdropActions> | </AirdropActions> | ||||
</Form.Item> | </Form.Item> | ||||
</> | </> | ||||
)} | )} | ||||
</Form> | </Form> | ||||
</AntdFormWrapper> | </AntdFormWrapper> | ||||
</CustomCollapseCtn> | </CustomCollapseCtn> | ||||
</Col> | </Col> | ||||
Show All 25 Lines |