SMS Faucet (#4774)

* Faucet

* Remove flakey button-index testing

* Only display faucet when sms verified (mainnet)

* simplify availability checks

* WIP

* Resuest from verified -> verified

* Update endpoint, display response text

* Error icon on errors

* Parse hash text response

* Use /api/:address endpoint

* hash -> data

* Adjust sms-certified message
This commit is contained in:
Jaco Greeff
2017-03-07 20:21:07 +01:00
committed by GitHub
parent 4d08e7b0ae
commit c3c83086bc
10 changed files with 421 additions and 59 deletions

View File

@@ -22,13 +22,13 @@ import styles from './modalBox.css';
export default class ModalBox extends Component {
static propTypes = {
children: PropTypes.node.isRequired,
children: PropTypes.node,
icon: PropTypes.node.isRequired,
summary: nodeOrStringProptype()
}
render () {
const { children, icon } = this.props;
const { icon } = this.props;
return (
<div className={ styles.body }>
@@ -37,14 +37,26 @@ export default class ModalBox extends Component {
</div>
<div className={ styles.content }>
{ this.renderSummary() }
<div className={ styles.body }>
{ children }
</div>
{ this.renderBody() }
</div>
</div>
);
}
renderBody () {
const { children } = this.props;
if (!children) {
return null;
}
return (
<div className={ styles.body }>
{ children }
</div>
);
}
renderSummary () {
const { summary } = this.props;