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> <span>{inputCaption}</span>
</div> </div>
<aside className={styles.paymentIcon}> <aside className={styles.paymentIcon}>
{(() => { {isOnchain &&
if (isOnchain) { <i>
return ( <span>on-chain</span>
<i> <FaChain />
<span>on-chain</span> </i>
<FaChain /> }
</i> {isLn &&
) <i>
} else if (isLn) { <span>lightning network</span>
return ( <FaBolt />
<i> </i>
<span>lightning network</span> }
<FaBolt />
</i>
)
}
return null
})()}
</aside> </aside>
<section className={styles.input}> <section className={styles.input}>
<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 // TODO: Add payment to state, not a total re-fetch
export const paymentSuccessful = () => (dispatch) => { export const paymentSuccessful = () => (dispatch) => {
// Dispatch successful payment to stop loading screen // Dispatch successful payment to stop loading screen
dispatch(paymentSuccessfull()) dispatchs(paymentSuccessfull())
// Close the form modal once the payment was succesful // Close the form modal once the payment was succesful
dispatch(setFormType(null)) dispatch(setFormType(null))

Loading…
Cancel
Save