Starts using redux store for storing the date
This commit is contained in:
@@ -3,6 +3,9 @@ import {
|
||||
ScrollView,
|
||||
TextInput,
|
||||
} from 'react-native'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import { getDate } from '../../../slices/date'
|
||||
|
||||
import styles from '../../../styles'
|
||||
import SymptomSection from './symptom-section'
|
||||
@@ -10,7 +13,7 @@ import { noteExplainer } from '../../../i18n/en/cycle-day'
|
||||
import { shared as sharedLabels } from '../../../i18n/en/labels'
|
||||
import SymptomView from './symptom-view'
|
||||
|
||||
export default class Note extends SymptomView {
|
||||
class Note extends SymptomView {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
const cycleDay = props.cycleDay
|
||||
@@ -53,3 +56,14 @@ export default class Note extends SymptomView {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return({
|
||||
date: getDate(state)
|
||||
})
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null
|
||||
)(Note)
|
||||
|
||||
Reference in New Issue
Block a user