about summary refs log tree commit diff
path: root/src/view/com/search/HeaderWithInput.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-07-28 08:29:37 -0700
committerGitHub <noreply@github.com>2023-07-28 10:29:37 -0500
commit38d78e16bffc9a25a45a4ad41caeef2c075daa26 (patch)
tree091bd4a86548899d64ad904c7f0fbf1fbb745778 /src/view/com/search/HeaderWithInput.tsx
parent8e9b8b6b36bc5bb68737b783ae6accfd435fda8e (diff)
downloadvoidsky-38d78e16bffc9a25a45a4ad41caeef2c075daa26.tar.zst
Search custom feeds (#1031)
* paginate custom feeds

* basic search

* update `@atproto/api`

* use search from the API

* debounce search for 200ms
Diffstat (limited to 'src/view/com/search/HeaderWithInput.tsx')
-rw-r--r--src/view/com/search/HeaderWithInput.tsx24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/view/com/search/HeaderWithInput.tsx b/src/view/com/search/HeaderWithInput.tsx
index 0d65d98fd..2ec079dde 100644
--- a/src/view/com/search/HeaderWithInput.tsx
+++ b/src/view/com/search/HeaderWithInput.tsx
@@ -21,6 +21,7 @@ interface Props {
   onPressClearQuery: () => void
   onPressCancelSearch: () => void
   onSubmitQuery: () => void
+  showMenu?: boolean
 }
 export function HeaderWithInput({
   isInputFocused,
@@ -30,6 +31,7 @@ export function HeaderWithInput({
   onPressClearQuery,
   onPressCancelSearch,
   onSubmitQuery,
+  showMenu = true,
 }: Props) {
   const store = useStores()
   const theme = useTheme()
@@ -49,16 +51,18 @@ export function HeaderWithInput({
 
   return (
     <View style={[pal.view, pal.border, styles.header]}>
-      <TouchableOpacity
-        testID="viewHeaderBackOrMenuBtn"
-        onPress={onPressMenu}
-        hitSlop={MENU_HITSLOP}
-        style={styles.headerMenuBtn}
-        accessibilityRole="button"
-        accessibilityLabel="Menu"
-        accessibilityHint="Access navigation links and settings">
-        <FontAwesomeIcon icon="bars" size={18} color={pal.colors.textLight} />
-      </TouchableOpacity>
+      {showMenu ? (
+        <TouchableOpacity
+          testID="viewHeaderBackOrMenuBtn"
+          onPress={onPressMenu}
+          hitSlop={MENU_HITSLOP}
+          style={styles.headerMenuBtn}
+          accessibilityRole="button"
+          accessibilityLabel="Menu"
+          accessibilityHint="Access navigation links and settings">
+          <FontAwesomeIcon icon="bars" size={18} color={pal.colors.textLight} />
+        </TouchableOpacity>
+      ) : null}
       <View
         style={[
           {backgroundColor: pal.colors.backgroundLight},