Skip to content

Commit

Permalink
Merge pull request #8194 from rushatgabhane/cleanup
Browse files Browse the repository at this point in the history
[No QA] Remove unnecessary checks for InlineErrorText
  • Loading branch information
mountiny authored Mar 17, 2022
2 parents 2c7c82c + 7dab243 commit 6bbda7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
8 changes: 3 additions & 5 deletions src/components/CheckboxWithLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ const CheckboxWithLabel = React.forwardRef((props, ref) => {
{LabelComponent && (<LabelComponent />)}
</TouchableOpacity>
</View>
{!_.isEmpty(props.errorText) && (
<InlineErrorText styles={[styles.ml8]}>
{props.errorText}
</InlineErrorText>
)}
<InlineErrorText styles={[styles.ml8]}>
{props.errorText}
</InlineErrorText>
</>
);
});
Expand Down
8 changes: 3 additions & 5 deletions src/components/Picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ class Picker extends PureComponent {
{...pickerProps}
/>
</View>
{!_.isEmpty(this.props.errorText) && (
<InlineErrorText>
{this.props.errorText}
</InlineErrorText>
)}
<InlineErrorText>
{this.props.errorText}
</InlineErrorText>
</>
);
}
Expand Down
8 changes: 3 additions & 5 deletions src/components/RadioButtonWithLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ const RadioButtonWithLabel = (props) => {
{LabelComponent && (<LabelComponent />)}
</TouchableOpacity>
</View>
{!_.isEmpty(props.errorText) && (
<InlineErrorText>
{props.errorText}
</InlineErrorText>
)}
<InlineErrorText>
{props.errorText}
</InlineErrorText>
</>
);
};
Expand Down

0 comments on commit 6bbda7e

Please sign in to comment.