From 55541809bc4e18fe97b09a236f65642085d1eb89 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 29 Mar 2021 12:53:55 -1000 Subject: [PATCH] Fix various propType warnings --- src/components/Tooltip/index.native.js | 7 +++++-- src/pages/home/ReportScreen.js | 2 +- src/pages/home/sidebar/OptionRow.js | 4 ++-- src/styles/styles.js | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Tooltip/index.native.js b/src/components/Tooltip/index.native.js index d5092883bbad..c73571ff5100 100644 --- a/src/components/Tooltip/index.native.js +++ b/src/components/Tooltip/index.native.js @@ -1,6 +1,10 @@ +import PropTypes from 'prop-types'; + // We can't use the common component for the Tooltip as Web implementation uses DOM specific method to // render the View which is not present on the Mobile. -import {propTypes, defaultProps} from './TooltipPropTypes'; +const propTypes = { + children: PropTypes.element, +}; /** * There is no native support for the Hover on the Mobile platform so we just return the enclosing childrens @@ -10,6 +14,5 @@ import {propTypes, defaultProps} from './TooltipPropTypes'; const Tooltip = props => props.children; Tooltip.propTypes = propTypes; -Tooltip.defaultProps = defaultProps; Tooltip.displayName = 'Tooltip'; export default Tooltip; diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 2559679a805a..4689b41c95e8 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -16,7 +16,7 @@ const propTypes = { }; const defaultProps = { - currentlyViewedReportID: 0, + currentlyViewedReportID: '0', }; const ReportScreen = (props) => { diff --git a/src/pages/home/sidebar/OptionRow.js b/src/pages/home/sidebar/OptionRow.js index aeaa0982e799..a03575aa10e7 100644 --- a/src/pages/home/sidebar/OptionRow.js +++ b/src/pages/home/sidebar/OptionRow.js @@ -130,12 +130,12 @@ const OptionRow = ({ avatarImageURLs={option.icons} optionIsFocused={optionIsFocused} size={mode === 'compact' ? 'small' : 'default'} - styles={hovered && !optionIsFocused && { + styles={(hovered && !optionIsFocused) ? { secondAvatar: { backgroundColor: themeColors.sidebarHover, borderColor: themeColors.sidebarHover, }, - }} + } : undefined} /> ) } diff --git a/src/styles/styles.js b/src/styles/styles.js index 03e966cc7a46..781848b43834 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -242,7 +242,6 @@ const styles = { color: themeColors.textReversed, fontSize: variables.fontSizeSmall, lineHeight: 16, - userSelect: 'none', ...whiteSpace.noWrap, },