How to use the redux/actions.modals function in redux

To help you get started, we’ve selected a few redux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swaponline / swap.react / shared / components / modal / Modal / Modal.js View on Github external
    window.addEventListener('popstate', function (e) { actions.modals.close(name) }) // eslint-disable-line
github swaponline / swap.react / shared / pages / OldWallet / Row / Row.js View on Github external
handleWithdraw = () => {
    const {
      item: {
        decimals,
        token,
        contractAddress,
        unconfirmedBalance,
        currency,
        address,
        balance,
      },
    } = this.props

    // actions.analytics.dataEvent(`balances-withdraw-${currency.toLowerCase()}`)
    actions.modals.open(constants.modals.Withdraw, {
      currency,
      address,
      contractAddress,
      decimals,
      token,
      balance,
      unconfirmedBalance,
    })
  }
github swaponline / swap.react / shared / components / modals / EosBuyAccountModal / EosBuyAccountModal.js View on Github external
handleSubmit = async () => {
    actions.loader.show(true)

    try {
      await actions.eos.buyAccount()

      actions.modals.close(constants.modals.EosBuyAccount)
    } catch (e) {
      console.error(e)
      this.setState({ error: e.toString() })
    }

    actions.loader.hide()
  }
github swaponline / swap.react / shared / pages / Wallet / Row / Row.js View on Github external
handleGenerateMultisignLink = async () => {
    actions.modals.open(constants.modals.MultisignJoinLink, {})
  }
github swaponline / swap.react / shared / pages / Wallet / Row / Row.js View on Github external
handleWithdraw = () => {
    const {
      item: {
        currency,
      },
      item
    } = this.props

    const { Withdraw, WithdrawMultisigSMS, WithdrawMultisigUser } = constants.modals;

    let withdrawModalType = Withdraw;
    if (currency === 'BTC (SMS-Protected)') withdrawModalType = WithdrawMultisigSMS;
    if (currency === 'BTC (Multisig)') withdrawModalType = WithdrawMultisigUser;

    actions.modals.open(withdrawModalType, item)
  }
github swaponline / swap.react / shared / pages / Wallet / Row / Row.js View on Github external
handleEosRegister = () => {
    actions.modals.open(constants.modals.EosRegister, {})
  }
github swaponline / swap.react / shared / components / Balances / Balance.jsx View on Github external
openModal={() => {
                actions.modals.open(constants.modals.Withdraw, wallet)
              }}
            />
github swaponline / swap.react / shared / components / modals / Approve / Approve.js View on Github external
.then(() => {
        actions.loader.hide()
        actions.notifications.show(constants.notifications.Message, { message })
        actions.modals.close(constants.modals.Approve)
      })
      .catch(() => {
github swaponline / swap.react / shared / components / modals / PrivateKeysModal / PrivateKeysModal.js View on Github external
close = () => {
    const { name } = this.props

    localStorage.setItem(constants.localStorage.privateKeysSaved, true)
    actions.modals.close(name)
  }