diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index e1b663a7e344..166f8481ba07 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -266,7 +266,7 @@ function Button( /> )} - {textComponent} + {!!text && textComponent} {shouldShowRightIcon && ( diff --git a/src/components/Search/SearchPageHeader.tsx b/src/components/Search/SearchPageHeader.tsx index bae08155c262..f6a07a0c62d0 100644 --- a/src/components/Search/SearchPageHeader.tsx +++ b/src/components/Search/SearchPageHeader.tsx @@ -2,6 +2,7 @@ import React, {useMemo} from 'react'; import type {StyleProp, TextStyle} from 'react-native'; import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; +import Button from '@components/Button'; import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu'; import type {DropdownOption} from '@components/ButtonWithDropdownMenu/types'; import Header from '@components/Header'; @@ -301,6 +302,11 @@ function SearchPageHeader({queryJSON, hash, onSelectDeleteOption, setOfflineModa style={styles.ml2} /> )} +