Fix warnings on channel info row Formatted Text (#5644)
This commit is contained in:
parent
1287357e7c
commit
aa776e4ae6
2 changed files with 13 additions and 7 deletions
|
|
@ -169,7 +169,6 @@ class Option extends React.PureComponent<OptionProps, OptionState> {
|
|||
action={this.onPress}
|
||||
defaultMessage={binding.label}
|
||||
theme={theme}
|
||||
textId={binding.app_id + binding.location}
|
||||
image={binding.icon ? {uri: binding.icon} : null}
|
||||
/>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -79,17 +79,24 @@ function channelInfoRow(props) {
|
|||
);
|
||||
}
|
||||
|
||||
const labelStyle = [style.label, {color: textColor || theme.centerChannelColor}];
|
||||
let label = <Text style={labelStyle}>{defaultMessage}</Text>;
|
||||
if (textId) {
|
||||
label = (
|
||||
<FormattedText
|
||||
style={labelStyle}
|
||||
id={textId}
|
||||
defaultMessage={defaultMessage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const RowComponent = (
|
||||
<View
|
||||
testID={testID}
|
||||
style={style.container}
|
||||
>
|
||||
{iconElement}
|
||||
<FormattedText
|
||||
style={[style.label, {color: textColor || theme.centerChannelColor}]}
|
||||
id={textId}
|
||||
defaultMessage={defaultMessage}
|
||||
/>
|
||||
{label}
|
||||
<Text style={style.detail}>{detail}</Text>
|
||||
{actionElement}
|
||||
</View>
|
||||
|
|
@ -120,7 +127,7 @@ channelInfoRow.propTypes = {
|
|||
imageTintColor: PropTypes.string,
|
||||
isLandscape: PropTypes.bool,
|
||||
rightArrow: PropTypes.bool,
|
||||
textId: PropTypes.string.isRequired,
|
||||
textId: PropTypes.string,
|
||||
togglable: PropTypes.bool,
|
||||
textColor: PropTypes.string,
|
||||
theme: PropTypes.object.isRequired,
|
||||
|
|
|
|||
Loading…
Reference in a new issue