Browse Source

Fix: Renamed style class, fixed coding style issues, restructured copy invoice function

renovate/lint-staged-8.x
Nahom Abi 7 years ago
parent
commit
da0c8455ee
  1. 9
      app/routes/activity/components/components/Modal/Invoice/Invoice.js
  2. 3
      app/routes/activity/components/components/Modal/Invoice/Invoice.scss

9
app/routes/activity/components/components/Modal/Invoice/Invoice.js

@ -16,10 +16,11 @@ import styles from './Invoice.scss'
const Invoice = ({ invoice, ticker, currentTicker }) => {
const copyOnClick = (data) => {
copy(data)
const copyPaymentRequest = () => {
copy(invoice.payment_request)
showNotification('Noice', 'Successfully copied to clipboard')
}
return (
<div className={styles.container}>
<div className={styles.settled}>
@ -49,9 +50,9 @@ const Invoice = ({ invoice, ticker, currentTicker }) => {
<QRCode value={invoice.payment_request} size={150} />
</div>
<div className={styles.input}>
<p className={styles.hello}>
<p className={styles.invoiceAddress}>
<span>{invoice.payment_request}</span>
<span onClick={() => copyOnClick(invoice.payment_request)} className='hint--left' data-hint='Copy Invoice'>
<span onClick={copyPaymentRequest} className='hint--left' data-hint='Copy Invoice'>
<FaCopy />
</span>
</p>

3
app/routes/activity/components/components/Modal/Invoice/Invoice.scss

@ -53,7 +53,6 @@
.input {
padding: 10px 40px;
.paymentRequest {
text-align: center;
font-size: 12px;
@ -76,7 +75,7 @@
}
}
.hello {
.invoiceAddress {
display: flex;
flex-direction: row;
font-family: 'Roboto';

Loading…
Cancel
Save