sms verification: polish UI, linting issues 👕

This commit is contained in:
Jannis R 2016-11-10 16:23:09 +01:00
parent afdda48ab5
commit bd839d019c
No known key found for this signature in database
GPG Key ID: 0FE83946296A88A5
3 changed files with 8 additions and 10 deletions

View File

@ -61,7 +61,7 @@ export default class GatherData extends Component {
render () {
const { numberIsValid } = this.state;
const { isVerified, hasRequested } = this.props.data;
const { isVerified } = this.props.data;
// TODO: proper legal text
return (
@ -79,14 +79,14 @@ export default class GatherData extends Component {
label={ 'phone number' }
hint={ 'the SMS will be sent to this number' }
error={ numberIsValid ? null : 'invalid number' }
disabled={ isVerified || hasRequested }
disabled={ isVerified }
onChange={ this.numberOnChange }
onSubmit={ this.numberOnSubmit }
/>
<Checkbox
className={ styles.spacing }
label={ 'I agree that my number will be stored.' }
disabled={ isVerified || hasRequested }
disabled={ isVerified }
onCheck={ this.consentOnChange }
/>
</Form>
@ -140,7 +140,7 @@ export default class GatherData extends Component {
if (hasRequested) {
return (
<div className={ styles.container }>
<ErrorIcon />
<InfoIcon />
<p className={ styles.message }>You already requested verification.</p>
</div>
);

View File

@ -18,8 +18,6 @@ import React, { Component, PropTypes } from 'react';
import { Form, Input } from '../../../ui';
// import styles from './gatherData.css';
const isValidCode = /^[A-Z0-9_-]{7,14}$/i;
export default class QueryCode extends Component {

View File

@ -18,10 +18,10 @@ import React, { Component, PropTypes } from 'react';
import ActionDoneAll from 'material-ui/svg-icons/action/done-all';
import ContentClear from 'material-ui/svg-icons/content/clear';
import { BusyStep, CompletedStep, Button, IdentityIcon, Modal } from '../../ui';
import { validateAddress, validateUint } from '../../util/validation';
import { Button, IdentityIcon, Modal } from '../../ui';
import ABI from '../../contracts/abi/sms-verification.json';
// TODO: move this to a better place
const contract = '0xcE381B876A85A72303f7cA7b3a012f58F4CEEEeB';
import GatherData from './GatherData';
@ -120,9 +120,9 @@ export default class SMSVerification extends Component {
const { step } = this.state;
if (step === 4) {
return this.renderFifthStep();
} else if (step === 3) {
} else if (step === 3) {
return this.renderFourthStep();
} else if (step === 2) {
} else if (step === 2) {
return this.renderThirdStep();
} else if (step === 1) {
return this.renderSecondStep();