Lint rule react prop types addition

This commit is contained in:
Maria Zadnepryanets
2020-03-11 20:19:45 +00:00
committed by Sofiya Tepikin
parent 8444d466db
commit 47379d7a1e
26 changed files with 292 additions and 184 deletions
+12 -4
View File
@@ -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
}