Skip to content

Commit

Permalink
refactor: use prop-types module
Browse files Browse the repository at this point in the history
  • Loading branch information
justmoon authored and Michiel de Jong committed May 17, 2017
1 parent 3978c1b commit c34d840
Show file tree
Hide file tree
Showing 46 changed files with 91 additions and 45 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"pg-native": "^1.10.0",
"piping": "^0.3.0",
"pretty-error": "^1.2.0",
"prop-types": "^15.5.9",
"raw-loader": "^0.5.1",
"react": "^15.4.0",
"react-addons-create-fragment": "^15.4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Amount/Amount.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

import { amount } from '../../utils/amount'

Expand Down
3 changes: 2 additions & 1 deletion src/components/ChangePasswordForm/ChangePasswordForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { reduxForm, Field, SubmissionError } from 'redux-form'
import Validation from './Validation'

Expand Down
3 changes: 2 additions & 1 deletion src/components/ForgotPasswordForm/ForgotPasswordForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { reduxForm, Field, SubmissionError } from 'redux-form'
import Validation from './Validation'

Expand Down
3 changes: 2 additions & 1 deletion src/components/HelpIcon/HelpIcon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

import ReactTooltip from 'react-tooltip'

Expand Down
3 changes: 2 additions & 1 deletion src/components/Input/Input.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

import cx from 'classnames/bind'

Expand Down
3 changes: 2 additions & 1 deletion src/components/InputRaw/InputRaw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

export default class InputRaw extends Component {
static propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/components/List/List.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

export default class List extends Component {
static propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/components/LoginForm/LoginForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {Link} from 'react-router'
import {reduxForm, Field} from 'redux-form'
import loginValidation from './LoginValidation'
Expand Down
3 changes: 2 additions & 1 deletion src/components/PayButton/PayButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

export default class PayButton extends Component {
// TODO better validation
Expand Down
3 changes: 2 additions & 1 deletion src/components/PrettyJson/PrettyJson.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import _extend from 'lodash/extend'

import classNames from 'classnames/bind'
Expand Down
3 changes: 2 additions & 1 deletion src/components/RegisterForm/RegisterForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'
import registerValidation from './RegisterValidation'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Activity/Activity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { CSSTransitionGroup } from 'react-transition-group'
import ReactPaginate from 'react-paginate'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/ActivityPayment/ActivityPayment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { CSSTransitionGroup } from 'react-transition-group'
import {connect} from 'react-redux'
import moment from 'moment'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/ActivitySettlement/ActivitySettlement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'

import Amount from 'components/Amount/Amount'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/ActivityWithdrawal/ActivityWithdrawal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import moment from 'moment'
import TimeAgo from 'react-timeago'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/App/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { LinkContainer, IndexLinkContainer } from 'react-router-bootstrap'
import { Link } from 'react-router'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Auth/Auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import {Link} from 'react-router'
import * as authActions from 'redux/actions/auth'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Button/Button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'

import PayButton from 'components/PayButton/PayButton'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Home/Home.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import ReactTooltip from 'react-tooltip'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/InviteCreateForm/InviteCreateForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Invites/Invites.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import Helmet from 'react-helmet'
import ReactTooltip from 'react-tooltip'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Onboarding/Onboarding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import {Link} from 'react-router'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/PeerAddForm/PeerAddForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/PeerSettlementButton/PeerSettlementButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { DropdownButton, MenuItem } from 'react-bootstrap'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Peers/Peers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import Helmet from 'react-helmet'
import { HotKeys } from 'react-hotkeys'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Send/Send.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import SendForm from 'containers/SendForm/SendForm'

export default class Send extends Component {
Expand Down
3 changes: 2 additions & 1 deletion src/containers/SendForm/AmountsBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { amountsChange, requestQuote } from 'redux/actions/send'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/SendForm/DestinationBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { destinationChange, destinationReset } from 'redux/actions/send'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/SendForm/SendForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'
import { validate, asyncValidate } from './SendValidation'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Settings/ProfileForm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field, SubmissionError } from 'redux-form'
import DropzoneComponent from 'react-dropzone-component'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Settle/Settle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'

import classNames from 'classnames/bind'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Settlement/Settlement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import Helmet from 'react-helmet'
import { routeActions } from 'react-router-redux'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/SettlementCustom/SettlementCustom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'
import Helmet from 'react-helmet'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/SettlementInfo/SettlementInfo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'

import { Link } from 'react-router'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/SettlementMethod/SettlementMethod.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import Helmet from 'react-helmet'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/SettlementPaypal/SettlementPaypal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, Field } from 'redux-form'
import Helmet from 'react-helmet'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/SettlementRipple/SettlementRipple.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { reduxForm, Field } from 'redux-form'
import Helmet from 'react-helmet'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Stats/Stats.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import moment from 'moment'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Users/Users.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'
import Helmet from 'react-helmet'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Widget/Widget.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import * as authActions from 'redux/actions/auth'
import { asyncConnect } from 'redux-async-connect'
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Withdraw/Withdraw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { routeActions } from 'react-router-redux'

Expand Down
3 changes: 2 additions & 1 deletion src/containers/Withdrawals/Withdrawals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import Helmet from 'react-helmet'
import ReactTooltip from 'react-tooltip'
Expand Down
3 changes: 2 additions & 1 deletion src/decorators/hotkeys.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { HotKeys } from 'react-hotkeys'

Expand Down
3 changes: 2 additions & 1 deletion src/decorators/resetFormOnSuccess.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {reset} from 'redux-form'

// Always use after @connect it uses the success prop
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/Html.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {Component, PropTypes} from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom/server'
import serialize from 'serialize-javascript'
import Helmet from 'react-helmet'
Expand Down

0 comments on commit c34d840

Please sign in to comment.