Removes unnecessary prop and defines the missing propTypes
This commit is contained in:
+3
-2
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
|
|
||||||
import { getDate, setDate } from '../slices/date'
|
import { getDate } from '../slices/date'
|
||||||
import { getNavigation, navigate, goBack } from '../slices/navigation'
|
import { getNavigation, navigate, goBack } from '../slices/navigation'
|
||||||
|
|
||||||
import Header from './header'
|
import Header from './header'
|
||||||
@@ -21,6 +21,8 @@ class App extends Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
date: PropTypes.string,
|
date: PropTypes.string,
|
||||||
navigation: PropTypes.object.isRequired,
|
navigation: PropTypes.object.isRequired,
|
||||||
|
navigate: PropTypes.func,
|
||||||
|
goBack: PropTypes.func,
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -89,7 +91,6 @@ const mapStateToProps = (state) => {
|
|||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return({
|
return({
|
||||||
setDate: (date) => dispatch(setDate(date)),
|
|
||||||
navigate: (page) => dispatch(navigate(page)),
|
navigate: (page) => dispatch(navigate(page)),
|
||||||
goBack: () => dispatch(goBack()),
|
goBack: () => dispatch(goBack()),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user