From aa776e4ae6c1e23ea9f68ca3cc25269be24cc877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Thu, 23 Sep 2021 21:55:34 +0200 Subject: [PATCH] Fix warnings on channel info row Formatted Text (#5644) --- .../channel_info/bindings/bindings.tsx | 1 - app/screens/channel_info/channel_info_row.js | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/screens/channel_info/bindings/bindings.tsx b/app/screens/channel_info/bindings/bindings.tsx index 9b2a6285d..3f4067351 100644 --- a/app/screens/channel_info/bindings/bindings.tsx +++ b/app/screens/channel_info/bindings/bindings.tsx @@ -169,7 +169,6 @@ class Option extends React.PureComponent { action={this.onPress} defaultMessage={binding.label} theme={theme} - textId={binding.app_id + binding.location} image={binding.icon ? {uri: binding.icon} : null} /> diff --git a/app/screens/channel_info/channel_info_row.js b/app/screens/channel_info/channel_info_row.js index 1a44d7d0e..e986b52c8 100644 --- a/app/screens/channel_info/channel_info_row.js +++ b/app/screens/channel_info/channel_info_row.js @@ -79,17 +79,24 @@ function channelInfoRow(props) { ); } + const labelStyle = [style.label, {color: textColor || theme.centerChannelColor}]; + let label = {defaultMessage}; + if (textId) { + label = ( + + ); + } const RowComponent = ( {iconElement} - + {label} {detail} {actionElement} @@ -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,