Make link work
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
import {links} from '../../i18n/en/settings'
|
import links from '../../i18n/en/links'
|
||||||
|
|
||||||
export default function(url) {
|
export default function(url) {
|
||||||
const link = Object.values(links).find(link => link.url === url)
|
const link = Object.values(links).find(link => link.url === url)
|
||||||
if (url === 'mailto:bloodyhealth@mailbox.org') {
|
|
||||||
console.log(links.email.url === url)
|
|
||||||
}
|
|
||||||
return link ? link.text : url
|
return link ? link.text : url
|
||||||
}
|
}
|
||||||
+2
-3
@@ -158,11 +158,10 @@ export default class Home extends Component {
|
|||||||
}
|
}
|
||||||
{ isShowingMore &&
|
{ isShowingMore &&
|
||||||
<View>
|
<View>
|
||||||
<Hyperlink linkStyle={styles.link} linkText={replace}>
|
<Hyperlink linkStyle={styles.link} linkText={replace} linkDefault>
|
||||||
<AppText styles={styles.paragraph}>
|
<AppText styles={styles.paragraph}>
|
||||||
{ statusText }
|
{ `${statusText} ${links.moreAboutNfp.url}` }
|
||||||
</AppText>
|
</AppText>
|
||||||
<AppText>{links.moreAboutNfp.url}</AppText>
|
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import Hyperlink from 'react-native-hyperlink'
|
|||||||
import AppText from '../app-text'
|
import AppText from '../app-text'
|
||||||
import SettingsSegment from './shared/settings-segment'
|
import SettingsSegment from './shared/settings-segment'
|
||||||
import styles from '../../styles/index'
|
import styles from '../../styles/index'
|
||||||
import labels, { links } from '../../i18n/en/settings'
|
import labels from '../../i18n/en/settings'
|
||||||
|
import links from '../../i18n/en/links'
|
||||||
import replace from '../helpers/replace-url-with-text'
|
import replace from '../helpers/replace-url-with-text'
|
||||||
|
|
||||||
export default class AboutSection extends Component {
|
export default class AboutSection extends Component {
|
||||||
|
|||||||
Reference in New Issue
Block a user