diff --git a/src/components/TabSelector/TabSelector.tsx b/src/components/TabSelector/TabSelector.tsx index bbc49523fed4..d23ed3c85aa4 100644 --- a/src/components/TabSelector/TabSelector.tsx +++ b/src/components/TabSelector/TabSelector.tsx @@ -16,8 +16,6 @@ function TabSelector({ position, onFocusTrapContainerElementChanged, shouldShowLabelWhenInactive = true, - shouldShowProductTrainingTooltip = false, - renderProductTrainingTooltip, equalWidth = false, }: TabSelectorProps) { const icons = useMemoizedLazyExpensifyIcons(MEMOIZED_LAZY_TAB_SELECTOR_ICONS); @@ -70,8 +68,6 @@ function TabSelector({ onLongTabPress={onLongTabPress} position={position} shouldShowLabelWhenInactive={shouldShowLabelWhenInactive} - shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip} - renderProductTrainingTooltip={renderProductTrainingTooltip} equalWidth={equalWidth} /> diff --git a/src/components/TabSelector/TabSelectorBase.tsx b/src/components/TabSelector/TabSelectorBase.tsx index 89d8b543730a..93916bfc1503 100644 --- a/src/components/TabSelector/TabSelectorBase.tsx +++ b/src/components/TabSelector/TabSelectorBase.tsx @@ -26,8 +26,6 @@ function TabSelectorBase({ position, shouldShowLabelWhenInactive = true, equalWidth = false, - shouldShowProductTrainingTooltip = false, - renderProductTrainingTooltip, }: TabSelectorBaseProps) { const theme = useTheme(); const styles = useThemeStyles(); @@ -119,8 +117,6 @@ function TabSelectorBase({ testID={tab.testID} sentryLabel={tab.sentryLabel} shouldShowLabelWhenInactive={shouldShowLabelWhenInactive} - shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip} - renderProductTrainingTooltip={renderProductTrainingTooltip} equalWidth={equalWidth} badgeText={tab.badgeText} pendingAction={tab.pendingAction} diff --git a/src/components/TabSelector/TabSelectorItem.tsx b/src/components/TabSelector/TabSelectorItem.tsx index fb5ada5f9d94..421f643601b1 100644 --- a/src/components/TabSelector/TabSelectorItem.tsx +++ b/src/components/TabSelector/TabSelectorItem.tsx @@ -4,10 +4,8 @@ import {Animated} from 'react-native'; import Badge from '@components/Badge'; import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import Tooltip from '@components/Tooltip'; -import EducationalTooltip from '@components/Tooltip/EducationalTooltip'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; -import variables from '@styles/variables'; import CONST from '@src/CONST'; import TabIcon from './TabIcon'; import TabLabel from './TabLabel'; @@ -31,8 +29,6 @@ function TabSelectorItem({ shouldShowLabelWhenInactive = true, testID, sentryLabel, - shouldShowProductTrainingTooltip = false, - renderProductTrainingTooltip, equalWidth = false, badgeText, isDisabled = false, @@ -42,7 +38,6 @@ function TabSelectorItem({ const styles = useThemeStyles(); const [isHovered, setIsHovered] = useState(false); - const shouldShowEducationalTooltip = shouldShowProductTrainingTooltip && isActive; const {onTabLayout, scrollToTab} = useTabSelectorActions(); @@ -100,23 +95,7 @@ function TabSelectorItem({ ); - return shouldShowEducationalTooltip ? ( - - {children} - - ) : ( + return ( React.JSX.Element; }; type TabSelectorBaseItem = WithSentryLabel & { @@ -76,12 +70,6 @@ type TabSelectorBaseProps = { /** Whether tabs should have equal width. */ equalWidth?: boolean; - - /** Determines whether the product training tooltip should be displayed to the user. */ - shouldShowProductTrainingTooltip?: boolean; - - /** Function to render the content of the product training tooltip. */ - renderProductTrainingTooltip?: () => React.JSX.Element; }; type TabSelectorItemProps = WithSentryLabel & { @@ -121,12 +109,6 @@ type TabSelectorItemProps = WithSentryLabel & { /** Whether tabs should have equal width */ equalWidth?: boolean; - /** Determines whether the product training tooltip should be displayed to the user. */ - shouldShowProductTrainingTooltip?: boolean; - - /** Function to render the content of the product training tooltip. */ - renderProductTrainingTooltip?: () => React.JSX.Element; - /** Text to display on the badge on the tab. */ badgeText?: string; diff --git a/src/libs/Navigation/OnyxTabNavigator.tsx b/src/libs/Navigation/OnyxTabNavigator.tsx index 1a79a3b14cce..b87a155c1653 100644 --- a/src/libs/Navigation/OnyxTabNavigator.tsx +++ b/src/libs/Navigation/OnyxTabNavigator.tsx @@ -47,12 +47,6 @@ type OnyxTabNavigatorProps = Child /** Whether to show the label when the tab is inactive */ shouldShowLabelWhenInactive?: boolean; - /** Determines whether the product training tooltip should be displayed to the user. */ - shouldShowProductTrainingTooltip?: boolean; - - /** Function to render the content of the product training tooltip. */ - renderProductTrainingTooltip?: () => React.JSX.Element; - /** Whether to lazy load the tab screens */ lazyLoadEnabled?: boolean; @@ -100,8 +94,6 @@ function OnyxTabNavigator({ onTabSelected = () => {}, screenListeners, shouldShowLabelWhenInactive = true, - shouldShowProductTrainingTooltip, - renderProductTrainingTooltip, lazyLoadEnabled = false, onTabSelect, equalWidth = false, @@ -151,14 +143,12 @@ function OnyxTabNavigator({ ); }, - [TabBar, onTabBarFocusTrapContainerElementChanged, shouldShowLabelWhenInactive, shouldShowProductTrainingTooltip, renderProductTrainingTooltip, equalWidth], + [TabBar, onTabBarFocusTrapContainerElementChanged, shouldShowLabelWhenInactive, equalWidth], ); // If the selected tab changes, we need to update the focus trap container element of the active tab