Skip to content
Snippets Groups Projects
Commit a9333bd8 authored by Sofiya Tepikin's avatar Sofiya Tepikin
Browse files

Adds propTypes definition

parent ec907ab2
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import { LocalDate } from 'js-joda'
import React, { Component } from 'react'
import { ScrollView, View } from 'react-native'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { navigate } from '../slices/navigation'
import { getDate, setDate } from '../slices/date'
......@@ -26,6 +27,16 @@ import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles'
class Home extends Component {
static propTypes = {
navigate: PropTypes.func,
setDate: PropTypes.func,
// The following three is not being used,
// we could see if it's possible to not pass them from the <App />
cycleDay: PropTypes.object,
date: PropTypes.string,
handleBackButtonPress: PropTypes.func,
}
constructor(props) {
super(props)
......@@ -72,7 +83,6 @@ class Home extends Component {
<View flex={1}>
<ScrollView>
<View style={styles.homeView}>
<HomeElement
onPress={this.navigateToCycleDayView}
buttonColor={ cycleDayColor }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment