temp
This commit is contained in:
+9
-3
@@ -1,13 +1,14 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { Linking } from 'react-native'
|
|
||||||
import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native'
|
import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native'
|
||||||
import { LocalDate, ChronoUnit } from 'js-joda'
|
import { LocalDate, ChronoUnit } from 'js-joda'
|
||||||
import Icon from 'react-native-vector-icons/Entypo'
|
import Icon from 'react-native-vector-icons/Entypo'
|
||||||
|
import Hyperlink from 'react-native-hyperlink'
|
||||||
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
||||||
import { home as labels, bleedingPrediction as predictLabels, shared } from '../i18n/en/labels'
|
import { home as labels, bleedingPrediction as predictLabels, shared, links } from '../i18n/en/labels'
|
||||||
import cycleModule from '../lib/cycle'
|
import cycleModule from '../lib/cycle'
|
||||||
import { getCycleDaysSortedByDate } from '../db'
|
import { getCycleDaysSortedByDate } from '../db'
|
||||||
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
||||||
|
import replace from './helpers/replace-url-with-text'
|
||||||
import styles from '../styles'
|
import styles from '../styles'
|
||||||
import AppText, { AppTextLight } from './app-text'
|
import AppText, { AppTextLight } from './app-text'
|
||||||
import DripHomeIcon from '../assets/drip-home-icons'
|
import DripHomeIcon from '../assets/drip-home-icons'
|
||||||
@@ -95,6 +96,8 @@ export default class Home extends Component {
|
|||||||
labels.cycleDayKnown(cycleDayNumber) :
|
labels.cycleDayKnown(cycleDayNumber) :
|
||||||
labels.cycleDayNotEnoughInfo
|
labels.cycleDayNotEnoughInfo
|
||||||
|
|
||||||
|
const { statusText } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View flex={1}>
|
<View flex={1}>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
@@ -154,7 +157,10 @@ export default class Home extends Component {
|
|||||||
{ isShowingMore &&
|
{ isShowingMore &&
|
||||||
<View>
|
<View>
|
||||||
<AppText styles={styles.paragraph}>
|
<AppText styles={styles.paragraph}>
|
||||||
{this.state.statusText}
|
{ statusText && <AppText>{ `${status}.` }</AppText> }
|
||||||
|
<Hyperlink linkStyle={styles.link} linkText={replace}>
|
||||||
|
<AppText>${links.moreToNfp.url}`}</AppText>
|
||||||
|
</Hyperlink>
|
||||||
</AppText>
|
</AppText>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ export const home = {
|
|||||||
cycleDayKnown: d => `Your last period started ${getDaysDescriptor(d)}.`,
|
cycleDayKnown: d => `Your last period started ${getDaysDescriptor(d)}.`,
|
||||||
trackPeriod: 'track your period',
|
trackPeriod: 'track your period',
|
||||||
checkFertility: 'check your fertility',
|
checkFertility: 'check your fertility',
|
||||||
phase: n => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`
|
phase: n => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`,
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDaysDescriptor = cycleDayNumber => {
|
const getDaysDescriptor = cycleDayNumber => {
|
||||||
|
|||||||
+5
-1
@@ -14,7 +14,11 @@ export const links = {
|
|||||||
},
|
},
|
||||||
website: {
|
website: {
|
||||||
url: 'https://bloodyhealth.gitlab.io/'
|
url: 'https://bloodyhealth.gitlab.io/'
|
||||||
}
|
},
|
||||||
|
moreToNfp: {
|
||||||
|
url: 'https://gitlab.com/bloodyhealth/drip/wikis/nfp/intro',
|
||||||
|
text: 'More'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Reference in New Issue
Block a user