Newer
Older
import React, { Component } from 'react'
import { ScrollView } from 'react-native'
import FramedSegment from '../../framed-segment'
import styles from '../../../styles/index'
import replace from '../../helpers/replace-url-with-text'
export default class InfoSymptom extends Component {
render() {
const symptomView = this.props.symptomView
const symptomMapping = {
BleedingEditView: 'bleeding',
CervixEditView: 'cervix',
DesireEditView: 'desire',
MucusEditView: 'mucus',
NoteEditView: 'note',
PainEditView: 'pain',
SexEditView: 'sex',
TemperatureEditView: 'temperature'
}
const currentSymptom = symptomMapping[symptomView]
<FramedSegment
style={styles.framedSegmentLast}
title={labels[currentSymptom].title}
>
<Hyperlink linkStyle={styles.link} linkText={replace} linkDefault>
<AppText>{labels[currentSymptom].text}</AppText>
</Hyperlink>
</FramedSegment>