Lint rule react prop types addition
This commit is contained in:
committed by
Sofiya Tepikin
parent
8444d466db
commit
47379d7a1e
@@ -1,4 +1,5 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { View, FlatList, ActivityIndicator } from 'react-native'
|
||||
|
||||
import AppLoadingView from '../app-loading'
|
||||
@@ -17,6 +18,11 @@ import config from '../../config'
|
||||
import styles from './styles'
|
||||
|
||||
export default class CycleChart extends Component {
|
||||
static propTypes = {
|
||||
navigate: PropTypes.func,
|
||||
end: PropTypes.bool
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {}
|
||||
@@ -147,12 +153,14 @@ export default class CycleChart extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
function LoadingMoreView(props) {
|
||||
function LoadingMoreView({ end }) {
|
||||
return (
|
||||
<View style={styles.loadingMore}>
|
||||
{!props.end &&
|
||||
<ActivityIndicator size={'large'} color={'white'}/>
|
||||
}
|
||||
{!end && <ActivityIndicator size={'large'} color={'white'}/>}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
LoadingMoreView.propTypes = {
|
||||
end: PropTypes.bool
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { TouchableOpacity } from 'react-native'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
@@ -18,6 +19,18 @@ import {
|
||||
} from '../helpers/chart'
|
||||
|
||||
class DayColumn extends Component {
|
||||
static propTypes = {
|
||||
dateString: PropTypes.string.isRequired,
|
||||
chartSymptoms: PropTypes.array,
|
||||
columnHeight: PropTypes.number.isRequired,
|
||||
getFhmAndLtlInfo: PropTypes.func.isRequired,
|
||||
navigate: PropTypes.func.isRequired,
|
||||
setDate: PropTypes.func.isRequired,
|
||||
symptomHeight: PropTypes.number.isRequired,
|
||||
symptomRowSymptoms: PropTypes.array,
|
||||
xAxisHeight: PropTypes.number
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super()
|
||||
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Path, Shape } from 'react-native/Libraries/ART/ReactNativeART'
|
||||
|
||||
import styles from './styles'
|
||||
import config from '../../config'
|
||||
|
||||
export default class DotAndLine extends Component {
|
||||
static propTypes = {
|
||||
exclude: PropTypes.bool,
|
||||
leftY: PropTypes.number,
|
||||
leftTemperatureExclude: PropTypes.bool,
|
||||
rightY: PropTypes.number,
|
||||
rightTemperatureExclude: PropTypes.bool,
|
||||
y: PropTypes.number.isRequired
|
||||
}
|
||||
|
||||
shouldComponentUpdate(newProps) {
|
||||
return Object.keys(newProps).some(key => newProps[key] != this.props[key])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user