From a9333bd848b00e29bb3e9c32495930b503aff805 Mon Sep 17 00:00:00 2001 From: Sofiya Tepikin Date: Sat, 29 Feb 2020 12:59:17 +0100 Subject: [PATCH] Adds propTypes definition --- components/home.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/home.js b/components/home.js index fa98ac5..0b300cb 100644 --- a/components/home.js +++ b/components/home.js @@ -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 + cycleDay: PropTypes.object, + date: PropTypes.string, + handleBackButtonPress: PropTypes.func, + } + constructor(props) { super(props) @@ -72,7 +83,6 @@ class Home extends Component { -