Browse Source

fix(payform): cleaner logic for input caption

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
7452f7ecb6
  1. 30
      app/components/Form/PayForm.js
  2. 2
      app/reducers/payment.js

30
app/components/Form/PayForm.js

@ -67,24 +67,18 @@ class PayForm extends Component {
<span>{inputCaption}</span>
</div>
<aside className={styles.paymentIcon}>
{(() => {
if (isOnchain) {
return (
<i>
<span>on-chain</span>
<FaChain />
</i>
)
} else if (isLn) {
return (
<i>
<span>lightning network</span>
<FaBolt />
</i>
)
}
return null
})()}
{isOnchain &&
<i>
<span>on-chain</span>
<FaChain />
</i>
}
{isLn &&
<i>
<span>lightning network</span>
<FaBolt />
</i>
}
</aside>
<section className={styles.input}>
<input

2
app/reducers/payment.js

@ -69,7 +69,7 @@ export const payInvoice = paymentRequest => (dispatch) => {
// TODO: Add payment to state, not a total re-fetch
export const paymentSuccessful = () => (dispatch) => {
// Dispatch successful payment to stop loading screen
dispatch(paymentSuccessfull())
dispatchs(paymentSuccessfull())
// Close the form modal once the payment was succesful
dispatch(setFormType(null))

Loading…
Cancel
Save