Starts using redux store for storing the date
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
Switch,
|
||||
ScrollView
|
||||
} from 'react-native'
|
||||
import { Switch, ScrollView } from 'react-native'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import { getDate } from '../../../slices/date'
|
||||
|
||||
import styles from '../../../styles'
|
||||
import { bleeding } from '../../../i18n/en/cycle-day'
|
||||
import SelectTabGroup from '../select-tab-group'
|
||||
import SymptomSection from './symptom-section'
|
||||
import SymptomView from './symptom-view'
|
||||
|
||||
export default class Bleeding extends SymptomView {
|
||||
class Bleeding extends SymptomView {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
const cycleDay = props.cycleDay
|
||||
@@ -67,4 +68,15 @@ export default class Bleeding extends SymptomView {
|
||||
</ScrollView>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return({
|
||||
date: getDate(state)
|
||||
})
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null
|
||||
)(Bleeding)
|
||||
Reference in New Issue
Block a user