Browse Source

feature(on-chain focus): focus amount input if zap detects on-chain

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
bbcbb31385
  1. 9
      app/components/Form/PayForm.js

9
app/components/Form/PayForm.js

@ -7,6 +7,15 @@ import CurrencyIcon from 'components/CurrencyIcon'
import styles from './PayForm.scss'
class PayForm extends Component {
componentDidUpdate(prevProps) {
const { isOnchain, isLn, payform: { payInput } } = this.props
if (isOnchain) { this.amountInput.focus() }
if ((prevProps.payInput !== payInput) && isLn) {
console.log('go get the invoice')
}
}
render() {
const {
payform,

Loading…
Cancel
Save