diff --git a/components/home.js b/components/home.js
index 5e64814..2a234f6 100644
--- a/components/home.js
+++ b/components/home.js
@@ -1,42 +1,22 @@
import { ChronoUnit, LocalDate } from 'js-joda'
import React, { Component } from 'react'
-import { Dimensions, ScrollView, TouchableHighlight, View } from 'react-native'
-import Icon from 'react-native-vector-icons/Entypo'
+import { ScrollView, View } from 'react-native'
import DripHomeIcon from '../assets/drip-home-icons'
import { getCycleDay } from '../db'
import {
bleedingPrediction as predictLabels,
- home as labels,
- shared,
+ home as labels
} from '../i18n/en/labels'
import links from '../i18n/en/links'
import cycleModule from '../lib/cycle'
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles'
+
import AppText from './app-text'
import Button from './button'
import { formatDateForShortText } from './helpers/format-date'
-const ShowMoreToggler = ({ isShowingMore, onToggle }) => {
- const {height, width} = Dimensions.get('window')
- const leftPosition = isShowingMore ? 10 : width - 40
- const style = isShowingMore ? styles.showLess : styles.showMore
- const topPosition = height / 2 - styles.header.height - 30
-
- return (
-
-
- {isShowingMore ? shared.less : shared.more}
-
-
-
- )
-}
-
const IconText = ({ children, wrapperStyles }) => {
return (
@@ -75,7 +55,6 @@ export default class Home extends Component {
const fertilityStatus = getFertilityStatusForDay(this.todayDateString)
this.state = {
- isShowingMore: false,
cycleDayNumber: this.getCycleDayNumber(this.todayDateString),
predictionText: determinePredictionText(prediction),
bleedingPredictionRange: getBleedingPredictionRange(prediction),
@@ -91,12 +70,8 @@ export default class Home extends Component {
})
}
- toggleShowingMore = () => {
- this.setState({ isShowingMore: !this.state.isShowingMore })
- }
-
render() {
- const { isShowingMore, cycleDayNumber, phase, status } = this.state
+ const { cycleDayNumber, phase, status } = this.state
const { navigate } = this.props
const cycleDayMoreText = cycleDayNumber ?
labels.cycleDayKnown(cycleDayNumber) :
@@ -121,9 +96,7 @@ export default class Home extends Component {
{cycleDayNumber || labels.unknown}
- { isShowingMore &&
- {cycleDayMoreText}
- }
+ {cycleDayMoreText}
- { isShowingMore &&
-
- {this.state.predictionText}
-
- }
+
+ {this.state.predictionText}
+
{`${labels.phase(phase)} (${status})`}
}
- { isShowingMore &&
-
-
- { `${statusText} ${links.wiki.url}.` }
-
-
- }
+
+
+ { `${statusText} ${links.wiki.url}.` }
+
+
-
)
}
diff --git a/i18n/en/labels.js b/i18n/en/labels.js
index ddae047..df5d2ce 100644
--- a/i18n/en/labels.js
+++ b/i18n/en/labels.js
@@ -15,8 +15,6 @@ export const shared = {
date: 'Date',
cycleDayWithLinebreak: 'Cycle\nday',
loading: 'Loading ...',
- more: 'more',
- less: 'less',
enter: 'Enter'
}
diff --git a/styles/index.js b/styles/index.js
index 2b5d0f0..9928ef8 100644
--- a/styles/index.js
+++ b/styles/index.js
@@ -157,14 +157,6 @@ export default StyleSheet.create({
iconText: {
fontSize: 25
},
- showMore: {
- transform: [{rotate: '90deg'}],
- position: 'absolute',
- },
- showLess: {
- transform: [{rotate: '270deg'}],
- position: 'absolute'
- },
cycleDayNumber: {
fontSize: 15,
color: fontOnPrimaryColor,