Browse Source

fix(channels): update labels on channel form to display current currency

renovate/lint-staged-8.x
Jack Mallers 8 years ago
parent
commit
9c93eb328e
  1. 4
      app/routes/wallet/components/components/Channels/Channels.js
  2. 26
      app/routes/wallet/components/components/Channels/components/ChannelForm/ChannelForm.js

4
app/routes/wallet/components/components/Channels/Channels.js

@ -18,11 +18,11 @@ class Channels extends Component {
channelForm, channelForm,
setChannelForm setChannelForm
} = this.props } = this.props
console.log('ticker: ', ticker)
return ( return (
<div className={styles.channels}> <div className={styles.channels}>
<ChannelModal isOpen={channelModalOpen} resetChannel={setChannel} channel={modalChannel} /> <ChannelModal isOpen={channelModalOpen} resetChannel={setChannel} channel={modalChannel} />
<ChannelForm form={channelForm} setForm={setChannelForm} /> <ChannelForm form={channelForm} setForm={setChannelForm} ticker={ticker} />
<div className={styles.header}> <div className={styles.header}>
<h3>Channels</h3> <h3>Channels</h3>
<div <div

26
app/routes/wallet/components/components/Channels/components/ChannelForm/ChannelForm.js

@ -1,6 +1,7 @@
// @flow // @flow
import React, { Component } from 'react' import React, { Component } from 'react'
import ReactModal from 'react-modal' import ReactModal from 'react-modal'
import { FaUser, FaBitcoin, FaDollar } from 'react-icons/lib/fa'
import styles from './ChannelForm.scss' import styles from './ChannelForm.scss'
class ChannelForm extends Component { class ChannelForm extends Component {
@ -21,7 +22,8 @@ class ChannelForm extends Component {
} }
} }
const { form, setForm } = this.props const { form, setForm, ticker } = this.props
console.log('ticker: ', ticker)
return ( return (
<div> <div>
<ReactModal <ReactModal
@ -37,15 +39,22 @@ class ChannelForm extends Component {
<h1 className={styles.title}>Open a new channel</h1> <h1 className={styles.title}>Open a new channel</h1>
<section className={styles.pubkey}> <section className={styles.pubkey}>
<label>With</label> <label><FaUser /></label>
<input <input
type='text' type='text'
size='' size=''
placeholder='Public key' placeholder='Peer public key'
/> />
</section> </section>
<section className={styles.local}> <section className={styles.local}>
<label>$</label> <label>
{
ticker.currency === 'btc' ?
<FaBitcoin />
:
<FaDollar />
}
</label>
<input <input
type='text' type='text'
size='' size=''
@ -53,7 +62,14 @@ class ChannelForm extends Component {
/> />
</section> </section>
<section className={styles.push}> <section className={styles.push}>
<label>$</label> <label>
{
ticker.currency === 'btc' ?
<FaBitcoin />
:
<FaDollar />
}
</label>
<input <input
type='text' type='text'
size='' size=''

Loading…
Cancel
Save