Commit 1828beca authored by Lars van Rhijn's avatar Lars van Rhijn

No undefined is displayed when description is empty

parent 9efca603
...@@ -151,14 +151,16 @@ class RegistrationScreen extends Component { ...@@ -151,14 +151,16 @@ class RegistrationScreen extends Component {
}} }}
/> />
</View> </View>
<HTML {!field.description || (
html={field.description} <HTML
onLinkPress={(event, href) => openUrl(href)} html={field.description}
baseFontStyle={styles.description} onLinkPress={(event, href) => openUrl(href)}
tagsStyles={{ baseFontStyle={styles.description}
a: linkStyles, tagsStyles={{
}} a: linkStyles,
/> }}
/>
)}
{validity.isValid || ( {validity.isValid || (
<Text style={styles.invalid}> <Text style={styles.invalid}>
{validity.reason} {validity.reason}
...@@ -172,14 +174,16 @@ class RegistrationScreen extends Component { ...@@ -172,14 +174,16 @@ class RegistrationScreen extends Component {
<Text style={styles.field}> <Text style={styles.field}>
{field.label} {field.label}
</Text> </Text>
<HTML {!field.description || (
html={field.description} <HTML
onLinkPress={(event, href) => openUrl(href)} html={field.description}
baseFontStyle={styles.description} onLinkPress={(event, href) => openUrl(href)}
tagsStyles={{ baseFontStyle={styles.description}
a: linkStyles, tagsStyles={{
}} a: linkStyles,
/> }}
/>
)}
<TextInput <TextInput
value={this.state[key]} value={this.state[key]}
onChangeText={value => this.updateField(key, value)} onChangeText={value => this.updateField(key, value)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment